Last active
December 29, 2015 17:29
-
-
Save hfhimage/7704450 to your computer and use it in GitHub Desktop.
修改数据库
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
查看列:desc 表名; | |
修改表名:alter table t_book rename to bbb; | |
添加列:alter table 表名 add column 列名 varchar(30); | |
删除列:alter table 表名 drop column 列名; | |
修改列名MySQL: alter table bbb change nnnnn hh int; | |
修改列名SQLServer:exec sp_rename't_student.name','nn','column'; | |
修改列名Oracle:lter table bbb rename column nnnnn to hh int; | |
修改列属性:alter table t_book modify name varchar(22); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment