脚本表为 - ALTER TO为灰色 - SQL SERVER

时间:2021-09-21 09:02:44

Script table as - ALTER TO is greyed out - SQL SERVER 2005 and sql server 2008. Is there any way to enable this>? or do we still write the alter command to alter any table?

脚本表为 - ALTER TO为灰色 - SQL SERVER 2005和sql server 2008.有没有办法启用此>?或者我们是否仍然编写alter命令来改变任何表格?

It seems ALTER using right click on the object is only applicable to SPs and functions

似乎ALTER使用右键单击该对象仅适用于SP和函数

2 个解决方案

#1


7  

This command is not available for tables (but is for the other objects). The alternative is either to use "Design" from hte same menu, or to write down your own change scripts. I'd definitelly recommend to avoid the designer.

此命令不适用于表(但适用于其他对象)。另一种方法是从相同的菜单中使用“设计”,或者写下你自己的更改脚本。我肯定会建议避开设计师。

#2


1  

ALTER TO does not work for tables. You can however use Design to enter the Table Designer. When you are done with the changes you can either apply them directly or use Generate Change Script to get the SQL that SSMS would use when applying the changes you have made in the designer.

ALTER TO不适用于表格。但是,您可以使用Design进入表设计器。完成更改后,您可以直接应用它们,也可以使用“生成更改脚本”来获取SSMS在应用您在设计器中所做的更改时将使用的SQL。

#1


7  

This command is not available for tables (but is for the other objects). The alternative is either to use "Design" from hte same menu, or to write down your own change scripts. I'd definitelly recommend to avoid the designer.

此命令不适用于表(但适用于其他对象)。另一种方法是从相同的菜单中使用“设计”,或者写下你自己的更改脚本。我肯定会建议避开设计师。

#2


1  

ALTER TO does not work for tables. You can however use Design to enter the Table Designer. When you are done with the changes you can either apply them directly or use Generate Change Script to get the SQL that SSMS would use when applying the changes you have made in the designer.

ALTER TO不适用于表格。但是,您可以使用Design进入表设计器。完成更改后,您可以直接应用它们,也可以使用“生成更改脚本”来获取SSMS在应用您在设计器中所做的更改时将使用的SQL。