MSG 2714有一个已经命名的对象

时间:2016-03-17 21:51:10

标签: sql-server sql-server-2008

CREATE PROC PS_LOGIN(
    @ID NVARCHAR(50), 
    @PSW NVARCHAR(50)
)
AS
BEGIN
    SELECT * FROM Table_Users WHERE ID=@ID AND PSW=@PSW
END

1 个答案:

答案 0 :(得分:0)

尝试这样的事情......

IF OBJECT_ID('PS_LOGIN' , 'P') IS NOT NULL 
  DROP PROC PS_LOGIN 
GO


CREATE PROC PS_LOGIN(
    @ID NVARCHAR(50), 
    @PSW NVARCHAR(50)
)
AS
BEGIN
    SELECT * FROM Table_Users WHERE ID=@ID AND PSW=@PSW
END
GO