Organize your memo:
To Add a field :
ALTER TABLE table name
Add column field FirstName type default after field name (after which field is added)
Example:
Alter Table Appstore_souapp_app_androidmarket ADD column varchar (+) default NULL After GetPrice
To Modify a field :
ALTER TABLE table name
Change field name new field FirstName type default value
Example:
Alter Table varchar (ten) null;
ALTER TABLE BIGINT (NULL' system order number ' )
To delete a field :
ALTER TABLE table name drop column field name
Example:
Alter table Appstore_souapp_app_androidmarket<BR>dropcolumn Getpricecurrency
To adjust the order of fields :
ALTER TABLE table name
Change field name new field FirstName type default after field name (after which field is skipped)
Example:
Alter table Appstore_souapp_app_androidmarket<BR>varchar(50 ) & default NULL After GetPrice
Original: http://blog.csdn.net/changemyself/article/details/5976207
MySQL field Common operations Add, modify, delete, adjust field order