Friday, December 19, 2008

whats the difference between sp_helptext and sp_help

sp_helptext
sp_helptext displays the definition of a user-defined rule, default, unencrypted Transact-SQL stored procedure, user-defined Transact-SQL function, trigger, computed column, CHECK constraint, view.

Syntax:-
sp_helptext [ @objname = ] 'name' [ , [ @columnname = ] computed_column_name ]

Example:
Exec sp_helptext proc_name.

sp_help
sp_help reports information about a database object (any object listed in the sysobjects
table), a user-defined data type

Syntax:-
sp_help [ [ @objname = ] name ]

Example:
EXEC sp_help tablename

No comments: