Pages

Saturday, August 29, 2009

Basic SQL System Stored Procedures to be known by every Developer

There are large number of System Stored Procedures. Here are few stored procedures that should be known by every developer who work with Databases. And these stored procedures will be very handy at times(Particularly for me.My favorites :) ).


sp_Help:

Gives the structure of the table.

Syntax: sp_Help

Eg: sp_Help 'dbo.tblProduct'



sp_Helptext:

Gives the definition of the objects like Stored Procedures(both user defined and system defined), Triggers, Functions and etc.

Syntax: sp_Helptext

Eg: sp_Helptext 'dbo.sp_tblProduct_Insert'



sp_Depends:

Gives all the Stored Procedure and View associated with the Table.

Syntax: sp_Depends

Eg: sp_Depends 'dbo.tblProduct'



sp_Spaceused:

Gives information on the size database objects.

Syntax: sp_Spaceused

Eg: sp_Spaceused 'dbo.tblProduct'


I can assure you these System Stored Procedures will help you in Development.

Please let me know your thoughts. Have a wonderful time.

No comments:

Post a Comment