Thursday, 16 October 2014

Rename a table column in MySQL

Syntax:
ALTER TABLE xyz CHANGE manufacurerid manufacturerid datatype(length)


Try this also:
There is an syntax problem because the right syntax to alter command is

ALTER TABLE tablename CHNAGE OldColumnName NewColunmName DATATYPE ;






Other information:

Add the NOT NULL constraint to a column


Alter table table_name change column_name column_name datatype(length) definition

ie,

Alter table wall change tocken_messa
ge tocken_message varchar(40) NOT NULL DEFAULT

0 comments:

Post a Comment