Query the contents of stored procedures on SQL Server

后端 未结 4 840
时光取名叫无心
时光取名叫无心 2021-02-03 21:10

I am exploring a legacy database system and have very little knowledge of its internals. I would like to find all the stored procedures that invoke another stored procedure

4条回答
  •  忘了有多久
    2021-02-03 21:10

    Try This only one statement can solve your problem..

    SELECT OBJECT_DEFINITION(OBJECT_ID(N'dbo.myStoredProc'))
    

    or

    SELECT @objname= OBJECT_DEFINITION(OBJECT_ID(N'dbo.myStoredProc'))
    print @objname
    

提交回复
热议问题