本文介绍了如何在sql server 2008中获取alter table脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在sql server 2008中获取alter table脚本?
How to get alter table script in sql server 2008?
推荐答案
/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
ALTER TABLE dbo.MyTable SET (LOCK_ESCALATION = TABLE)
GO
COMMIT
请注意,这不包含表结构的完整信息。
如果您想要ALTER脚本中的完整信息,请生成CREATE TO脚本,然后更改手动更改指令。
Note that this doesn't contain full info on the table structure.
If you want full info in the ALTER script, generate a CREATE TO script instead, and change the instruction to ALTER manually.
这篇关于如何在sql server 2008中获取alter table脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!