Created
May 9, 2014 05:50
-
-
Save douglarek/ff90bf815a349fc36963 to your computer and use it in GitHub Desktop.
MySQL Tutorial.
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
mysql修改表名,列名,列类型,添加表列,删除表列 | |
修改表名(设表明为testtable,将其命名为newtablename) | |
alter table testtable rename newtablename; | |
添加表列: | |
alter table testtable add column name varchar(40); | |
删除列: | |
alter table testtable drop column name; | |
修改列的类型: | |
alter table testtable modify address char(40) | |
或者这样:alter table testtable change address address char(40) | |
修改表列名 | |
alter table testtable change column address address1 varchar(30) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment