sql - 修改结构

1,修改表名

语法:  

sp_rename old_table_name, new_table_name 

例如:

sp_rename t_review, t_business

2,修改字段:

MySQL:

ALTER TABLE Customer MODIFY Address char(100);

Oracle:

ALTER TABLE Customer MODIFY Address char(100);

SQL Server:

ALTER TABLE Customer ALTER COLUMN Address char(100);
 

ref: http://stackoverflow.com/questions/5335528/sql-server-alter-rename-table

你可能感兴趣的:(sql)