June 2015
Intermediate to advanced
1800 pages
70h 6m
English
Besides using T-SQL commands to create functions, you can also use them to view and modify functions. You can get information by using the provided system procedures and queries against system views. The following sections describe these methods.
There are multiple methods to view the source code for a user-defined function. One way is to use the sp_helptext procedure:
use AdventureWorks2012goexec sp_helptext getonlydatego/* resultText--------------------------------------------------------------------CREATE FUNCTION getonlydate ()RETURNS datetimeASBEGIN RETURN (select convert(datetime, convert(date, getdate())))END*/
Note
To display ...
Read now
Unlock full access