楼主只有用
sp_executesql N'...'--把存储过程全拼揍国字符串

解决方案 »

  1.   

    事务放在外面
    拼揍字符串执行
    :begin tran exec sp_executesql N'create proc Test
    as
    select * from sysobjects'exec sp_executesql N'
    create proc test2
    as
    select * 'if @@error<>0
    rollback tran commit tran
      

  2.   

    多谢roy_88的回复
    如果新建存储过程的语句长度超过8000字符时,有其他办法处理不?
      

  3.   

    在CSDN消息里查看:刚已加你为好友了...