#12005/8/1 14:05:55
在SQL中的存储过程是这样的
CREATE PROCEDURE VerifyPassword
(
@username Varchar( 20 ),
@password Varchar( 20 )
)
AS
DECLARE @foundUser Varchar( 20 )
SELECT @foundUser = ul_username
FROM UserList
WHERE ul_username = @username
AND ul_password = @password
IF @foundUser IS NOT NULL
Return 0
ELSE
IF Exists( SELECT ul_username
FROM UserList WHERE ul_username = @username )
Return 2
ELSE
RETURN 1
GO
功能是在用户登录时使用,可以转化为ACCESS的查询吗?
ACCESS中写查询的时候可以定义变量吗?