createPROCEDURE sp_fy_readtable @strResultvarchar(100) output, @tbNamevarchar(20) as begin ifexists (select*from sysobjects where name =@tbNameand xtype='U')--判断表名是不是存在 begin exec ('select * from '+@tbname) select@strResult='Task completed!' end else begin select@strResult='Incorrect table name' end END