存储过程太多了,想按存储过程的名称搜索,求sql语句

解决方案 »

  1.   

    select name from sys.objects where type='p'
      

  2.   

    select * from sysobjects where name=''
    lz要的是内容还是什么啊,也不说清楚
     select text from syscomments where id=object_id('存储过程名称')
    这个是得到存储过程内容的
      

  3.   

    将条件
    select text from syscomments where id=object_id('存储过程名称')替换成
    where id like object_id('存储过程名称')
      

  4.   


    select a.* ,b.name from syscomments a,sysobjects b
    where b.id=a.id and 
    b.name like '存储过程名称%'