ALTER PROCEDURE [dbo].[Signin_Check]
@uid varchar(50), @pwd varchar(50), @uname varchar(50) output
AS
IF EXISTS (SELECT * FROM threeLayer_user WHERE uid = @uid and pass = @pwd)
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
SELECT @uname = name
FROM threeLayer_user
WHERE uid = @uid and pass = @pwd
RETURN @uname
END
此存储过程引发错误:
将 varchar 值“Saurav”转换为数据类型 int 时转换失败。