Useful and Most used mysql commands


See the description of the fields 

DESC atd_order_extras;

Add a new field to an existing table (at the beginning)

ALTER TABLE table ADD field VARCHAR(10) FIRST;

Add a new field to an existing table (after a concrete field)

ALTER TABLE table ADD field VARCHAR(10) AFTER another_field;

Delete a field from an existing table

ALTER TABLE table DROP field;

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s