Saturday, May 25, 2013

[SQL][MySQL] Way to delete table column in MySQL

To drop a table column in mysql, you can use this command:
ALTER TABLE <your_table_name> DROP COLUMN <column_name>;
<---- change the text in red to your own-text

example:
ALTER TABLE users2 DROP COLUMN facebook_urlo;
It means delete the column(facebook_urlo) in table(users2),

Result figure:





No comments :

Post a Comment