SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO 评
论内容1<br>评论内容2<br>评论内容1<br><br><br><
br>评论内容2<br><br><br><br><br>评论内容2<
br><br><br><br><br>评论内容4<br>', getdate(), @i, 'Blog标题', @i, '用户名称', '用户呢称', 'Blog名称', 'test@126.com', '124.458.135.500', 0, 1, 'http://www.blogcn.com', 1, @i) if( @@error!=0 ) goto ErrorHandler ErrorHandler: if( @@error!=0 ) begin rollbacktran end set@i=@i+1 end GO SET QUOTED_IDENTIFIER OFF GO SET ANSI_NULLS ON GO
2 产生分页的存储过程
SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO GO
3、根据存储过程名取存储过程内容
-- 根据存储过程名取存储过程内容 -- 调试 GetContentByProcedureName '[dbo].[CPP_CountOfTrdeByUserID]' alterprocedure GetContentByProcedureName (@ProcedureNamenvarchar(500)) as ifexists (select*from dbo.syscomments where id=object_id(N''+@ProcedureName+'')) select c.text, c.encrypted, c.number, xtype=convert(nchar(2), o.xtype), datalength(c.text), convert(varbinary(8000), c.text), 0from dbo.syscomments c, dbo.sysobjects o where o.id = c.id and c.id =object_id(N''+@ProcedureName+'') orderby c.number, c.colid option(robust plan)