关于存储过程的问题
@lasttime char(10),
@UserId varchar(50),
@strCharRoom varchar(50)
as
select * from Says where times>=@lasttime and strToWho
in (select strToWho fromSays where strToWho='' or strToWho=@UserId)
and strChatRoom=@strCharRoom
这个存储过程的结果和下面的SQL语句的结果怎么不一样啊?
select * from Says
where times>='2007-5-28 13:19:20'
and strToWho in (select strToWho fromSays where strToWho='' or strToWho='cc')
and strChatRoom='文学'
用存储过程得到3条记录,用SQL语句得到一条记录.