Keyword as column name
I have a few tables migrated from PostgreSQL which have "lock" keyword as column name. In order to avoid problems I want to change the column names. In PostgreSQL this is done like this:
ALTER TABLE table_name
RENAME COLUMN "lock" TO is_locked;
Can you help me do this in MySQL?
ALTER TABLE table_name
CHANGE COLUMN lock is_locked character varying(3);
It doesn't work like this. I've also tried surrounding lock keyword with ' or ".
Subject
Written By
Posted
Keyword as column name
April 22, 2008 02:12AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.