Jul 242013
ALTER THE COLUMN DEFINITION alter table journal2 modify utc_dttm timestamp not null default current_timestamp on update current_timestamp Note: Everything after the column name is ths same as creating a column. Also you can use "change" instead of modify.
Making a column unique: ALTER TABLE test1 add unique (column1); Giving the unique index a name: ALTER TABLE test1 add unique uniquename (column1); Also you might get ERROR 1062 Duplicate entry '' for key ??? if the column you are trying to make unique has duplicate data. This includes NULL and spaces. Removing the unique index: ALTER TABLE test1 drop index column1; <-- Notice the missing parenthesis.