0
CONSTRAINT [PK_SLD] PRIMARY KEY CLUSTERED
([SLD_ID] ASC)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],
CONSTRAINT [USLD_NKEY] UNIQUE NONCLUSTERED
(
[P_TYP] ASC
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]
GO
我試圖寫在SQL約束,我發現了以下錯誤:錯誤在我的約束腳本=「與」
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'CONSTRAINT'.Msg 319, Level 15, State 1, Line 7
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
有什麼明顯的,我做錯誤?
感謝您的回覆,上面有一個更大的創建表格腳本。我沒有在原始問題中加入。 – webdad3
那麼它與你的第二次衝突。列名後沒有關閉')'。更新的代碼。你是否需要[主要]'語句3'? – dfundako
謝謝,這是問題。 – webdad3