CREATE FUNCTION FunISPop (@UserID nvarchar(20),@Password nvarchar(32),@SystemID nvarchar(8)='System') RETURNS nvarchar(8)ASBEGIN Declare @StrISPop as nvarchar(8)
if (select count(userid) from userinfo where userid=@userid and userpass=@Password)>0 then @strispop='True'
else @strispop='false'
Return @strispop
END
CREATE FUNCTION FunISPop( @UserID nvarchar(20), @Password nvarchar(32), @SystemID nvarchar(8)='System') RETURNS nvarchar(8) AS BEGIN Declare @StrISPop as nvarchar(8) if exists(select 1 from userinfo where userid=@userid and userpass=@Password) set @strispop='True' else set @strispop='false' Return @strispop END
那么,我想得到这个表中的其他字段的值,应该如何获得呢?select @strpy=py from userinfo where?这样么?
select @strpy1=py1,@strpy2=py2,@strpy3=py3 from userinfo where?
Declare @StrISPop as nvarchar(8)
if (select count(userid) from userinfo where userid=@userid and userpass=@Password)>0 then
@strispop='True'
else
@strispop='false'
Return @strispop
END
@UserID nvarchar(20),
@Password nvarchar(32),
@SystemID nvarchar(8)='System')
RETURNS nvarchar(8)
AS
BEGIN
Declare @StrISPop as nvarchar(8)
if exists(select 1 from userinfo where userid=@userid and userpass=@Password)
set @strispop='True'
else
set @strispop='false'
Return @strispop
END