Posts Tagged ‘System Stored Procedure code’

SQL Server – System Stored Procedure Script

System Stored Procedure Script

Have you seen script of System Stored Procedure of SQL Server? Well if you are curious creature like me, then why not see it.

To do that, we need to use another System Stored Procedure sp_helptext. It will display the script behind the specified System Stored Procedure.


EXEC sp_helptext ‘System Stored Procedure’


– – To see the script of sp_helplogins

EXEC sp_helptext ‘master..sp_helplogins’

Go ahead and try it with other System Stored Procedures.

Did you see how Microsoft codes their Stored Procedures? If you think “Even I can do this stuff“, feel luck and please forward your resume to Microsoft Corporation! 🙂

Good Luck!