我在SQL Server Management Studio中2014這個自動更新腳本生成的關鍵字「SET」不正確的語法(可視化編輯表格後):SQL Server 2005中 - 近
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.Rilevamenti ADD
DataScadenza datetime NULL
GO
DECLARE @v sql_variant
SET @v = N'Data di scadenza rilevata.'
EXECUTE sp_addextendedproperty N'MS_Description', @v, N'SCHEMA', N'dbo', N'TABLE', N'Rilevamenti', N'COLUMN', N'DataScadenza'
GO
ALTER TABLE dbo.Rilevamenti SET (LOCK_ESCALATION = TABLE)
GO
COMMIT
SELECT
Has_Perms_By_Name(N'dbo.Rilevamenti', 'Object', 'ALTER') as ALT_Per,
Has_Perms_By_Name(N'dbo.Rilevamenti', 'Object', 'VIEW DEFINITION') as View_def_Per,
Has_Perms_By_Name(N'dbo.Rilevamenti', 'Object', 'CONTROL') as Contr_Per
現在我想運行其他腳本數據庫運行在SQL Server 2005實例上,但是當我運行它時出現錯誤:
Incorrect syntax near the keyword 'SET'
語法錯誤在哪裏?
我相信SQL Server 2005上不存在「SET NUMERIC_ROUNDABORT OFF」和「SET CONCAT_NULL_YIELDS_NULL ON」 – AXMIM
其中一些命令不存在,它是不同的版本 – Hogan