How to rename mysql column from help
to content
in my table tbl_help
mysql_query("ALTER TABLE tbl_help " . "CHANGE COLUMN help content;");
You've got to include the definition of the column in the change column statement (not sure why, but that's what the documentation says.)
So this should work:
mysql_query("ALTER TABLE tbl_help " . "CHANGE COLUMN help content VARCHAR(200) ;");
From mySql Doc pages:
You can rename a column using a CHANGE old_col_name new_col_name column_definition
clause.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With