MySQL Commands

-> To set set primary key in a table
alter table tableName add primary key(id);

->To remove primary key from a table
alter table tableName drop primary key;

-> To set a default value for column
alter table tableName alter column fieldName set default AnyDefaultValue.

Comments

Popular posts from this blog

Git post receive setup at server for git push to the production from local machine