I am using the Adventure Works2008 database for this article. The Stored Procedures described here are very useful to speed up your work.
1. sp_help 'TableName'
-- returns the entire table structure.
For example:
- EXEC sp_help 'Production.Product'

2. sp_spaceused 'TableName'
-- returns the memory related details of the table.
For example:
- EXEC sp_spaceused 'Production.Product'

3. sp_helpconstraint 'TableName'
-- returns details of various constraints used in the table.
For example:
- exec sp_helpconstraint 'Production.Product'

4. sp_helpindex 'TableName'
-- To get the Index details of a table.
For example:
- exec sp_helpindex 'Production.Product'

5. sp_depends 'TableName'
--returns the list of Stored Procedures in which the table is used.
For example:
- exec sp_depends 'Production.Product'

6. sp_depends 'StoredProcedureName'
-- returns the list of tables that are used in the current Stored Procedure.
- exec sp_depends 'dbo.ufnGetProductListPrice'

7. sp_helptext 'StoredProcedureName'
Returns the strored procedure definition.
For example:
- EXEC sp_helptext 'dbo.ufnGetProductListPrice'


Rahul Kumar SaxenaPosted Feb 25, 2015, 1:21 PM
Nice One...
Ashish NakilPosted Feb 19, 2015, 12:11 AM
Thank you Parag
Parag KulthePosted Feb 18, 2015, 11:47 PM
Nice article Ashish.....Really useful...keep it on