Created
August 18, 2011 14:59
-
-
Save revathskumar/1154235 to your computer and use it in GitHub Desktop.
Rename table and Column query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE `table_name` ADD `new_field` VARCHAR( 255 ) NOT NULL AFTER `after_this_field` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE `table_name` CHANGE `old_field_name` `new_field_name` VARCHAR(100); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RENAME TABLE `old_table_name` TO `new_table_name`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment