Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: SQL
Expertise: Beginner
Jun 22, 2005



Building the Right Environment to Support AI, Machine Learning and Deep Learning

View the Source Code of Stored Procedures in Yukon

In SQL Server 2000, you would simply use sp_helptext to view the source code of both user-defined and system-stored procedures. But that isn't completely true in Yukon.

To view the source code of a user-defined stored procedure in Yukon, use the following code snippet:

sys.sp_helptext ProcedureName
Or you could also use the following:

sp_helptext ProcedureName
In SQL Server 2000, you'd use the following syntax to view the source code of system-stored procedures:

use master
sp_helptext sp_help
However, sp_helptext cannot be used to display the definition of system objects in Yukon. So, for system stored procedures use the following syntax:

Select object_definition (object_id ('sys.sp_helptext')) as 'Source of Sp_helptext'
Vadivel Mohanakrishnan
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date