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

WP register_post_type() with custom CMB2 meta box

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