How to get Sql Server VIEW Object code using TSQL

Sometimes upstream (place to collect data) or your vendor may give you the permission on some Views. Or you may have restricted SQL management Studio installed in your PC. Or you may can not view those View Objects from Management studio. So at that moment how one can view the code. The solution is simple. Use builtin sp_helptext from Query Analyzer or from provider query interface.

sp_helptext Syntax to view the code of a Sql Server View:

sp_helptext 'your view name'

sp_helptext SQL Example:

sp_helptext 'myView'

sp_helptext View

Leave a Reply

Your email address will not be published. Required fields are marked *

AlphaOmega Captcha Classica  –  Enter Security Code