How to view a stored function - SQL Server

后端 未结 7 2443
陌清茗
陌清茗 2020-12-28 17:03

Version: SQLServer 8

I would like to view the contents of a stored function in sqlserver, i.e. what exactly the function is doing.

None of the options listed

7条回答
  •  情歌与酒
    2020-12-28 17:42

    Whether it is Stored Procedure OR Function OR any SQL object below script will give the full definition

    USE
    SELECT OBJECT_DEFINITION (OBJECT_ID('')) AS ObjectDefinition 
    

    where OBJECT NAME could be your object name such as Stored Procedure / Function / Trigger ...etc name

提交回复
热议问题