Stored Procedures Functions Use Used to read and modify data. Used only to read data Execution Execute or Exec is used to execute SP Can used with SELECT statement, JOINS & APPLY (CROSS & OUTER). Joins Cannot JOIN a SP in a SELECT statement. Can JOIN a UDF in a SELECT statement. Temp objects Can … Continue reading Stored procedures(SP) Vs Functions(UDF)
Category: Stored procedure
Find number of tables used in stored procedure.
While doing analysis or reviewing database objects often we used to look and think for objects which are being used in any specific stored procedure or stored procedures. Following is the small script which is used to find out all the table used in stored procedures. -- Query to get list of all table used … Continue reading Find number of tables used in stored procedure.
Count number of rows in stored procedure
Following code is used to count number of rows in stored procedure.