我錯過了什麼。我有研究,但我收到此錯誤創建存儲過程的愚蠢錯誤
Msg 102, Level 15, State 1, Procedure sp_Create_User, Line 33
Incorrect syntax near '='.
下面是該過程
CREATE PROCEDURE [dbo].[sp_Create_User]
-- variables from site for new user create
@lg_ID varchar(50),
@lg_PW nchar(10),
@locked int,
@agreed int
AS
BEGIN
SET NOCOUNT ON
INSERT INTO dbo.userLogin
(LoginID, password, locked, agreed)
VALUES
(@lg_ID, @lg_PW, @locked = 0, @agreed = 0)
END
你不能說@locked = 0在值部分。在INSERT外部執行此操作。 – DOK 2012-02-25 21:09:38