这个存储过程为什么读不出数据啊?郁闷
IT流渊 2007-04-15 12:48:34 CREATE PROCEDURE PrSerchTag
@tag varchar(20)
AS
declare @id int
declare @tagid int
--declare @bool char(4)
begin
if exists (select tagid from tagtable where tagname like '%'+@tag+'%')
begin
select @tagid = tagid from tagtable where tagname like '%'+@tag+'%'
select @id= rizhiid from rizhitagtable where tagid =@tagid
select rizhiid,yonghuname,rizhititle,substring(rizhicontent,0,200)+'......' as 'rizhicontent',rizhitime,touchnum,yonghuid from rizhiview where rizhiid=@id
end
else
return (0)
end