Query table: select * fromsys. objectswheretypeU query Stored Procedure select * fromsys. objectswheretypeP query Stored Procedure content EXECSp_HelpText stored procedure name query User-Defined Function select * fromdbo. Explain query User-Defined Function content EXE
Query table: select * from sys. objects where type = 'U' query the Stored Procedure select * from sys. objects where type = 'P' queries the Stored Procedure content EXEC Sp_HelpText 'stored procedure name' queries the custom function select * from dbo. sysobjects WHERE xtype = 'af'
Query table:
Select * from sys. objects where type = 'U'
Query stored procedures
Select * from sys. objects where type = 'P'
Query Stored Procedure content
EXEC Sp_HelpText 'stored procedure name'
Query User-Defined Functions
Select * from dbo. sysobjects WHERE xtype = 'af'
Query the content of a custom function
EXEC Sp_HelpText 'user-Defined Function name'
You can view other types as follows:
Select xtype from dbo. sysobjects group by xtype
You can also use select * from sys. SQL _modules to view the content.