Using sp_help and sp_helptext to display view information

Use sp_help to report on a view:

sp_help hiprice
----------------

In the evaluated configuration, the system security officer must reset the allow select on syscomments.text column configuration parameter. (See evaluated configuration in the Glossary for more information.) When this happens, you must be the creator of the view or a system administrator to view the text of a view through sp_helptext.

To display the text of the create view statement, execute sp_helptext:

sp_helptext hiprice 
# Lines of Text 
-----------------
3 (1 row affected) text                                                                                                                                                                                                                                                             --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --Adaptive Server has expanded all '*' elements in the following statement create view hiprice as select titles.title_id, titles.title, titles.type, titles.pub_id, titles.price, 
titles.advance, titles.total_sales, titles.notes, titles.pubdate, 
titles.contract from titles where price > $15 and advance > $5000(3 rows affected)
(return status = 0)

If the source text of a view was encrypted using sp_hidetext, Adaptive Server displays a message advising you that the text is hidden. See the Reference Manual: Procedures.