语法不正确:创建存储过程 [英] Incorrect Syntax : Create Stored Procedure
本文介绍了语法不正确:创建存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经为用户登录身份验证目的创建了一个存储过程,但是我面临着麻烦.问题
不正确的Syntx:批处理中唯一的语句必须是创建过程"
I''ve created a stored procedure for the user login authentication purpose but I''m facing the foll. issue
Incorrect Syntx: ''Create procedure'' must be the only statement in the batch
CREATE PROCEDURE [dbo].[usp_UserLogin]
@Username VarChar(50),
@Password varChar(50),
@OutRes int OUTPUT
AS
BEGIN
set @OutRes = (SELECT count(*) FROM Users
WHERE [Username] = @Username And [Password] = @Password)
select case @OutRes
when 1 then 1 --Login is Correct
else
0
end
推荐答案
您必须在最后一行中再添加一个END
.
You have to add one more END
in the last line.
这篇关于语法不正确:创建存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文