示例:

A. 重命名表
下例将表 customers 重命名为 custs。
EXEC sp_rename 'customers', 'custs'

B. 重命名列
下例将表 customers 中的列 contact title 重命名为 title。
EXEC sp_rename 'customers.[contact title]', 'title', 'COLUMN'

 

来源:http://baike.baidu.com/view/3332418.htm

 

<%
Conn.ExeCute("sp_rename '"&Old_Table_Name&"','"&Table_Name&"';")

Conn.ExeCute("sp_rename '"&Table_Name&"."&Old_Field_Name&"','"&Field_Name&"','Column';")
%>

 

 

对现存字段改名:
ALTER TABLE distributors RENAME COLUMN address TO city;

更改现存表的名字:
ALTER TABLE distributors RENAME TO suppliers;
 

来源:http://baike.baidu.com/view/1763752.htm#4