SQL Server 2000
There are three types of UDF in Microsoft SQL Server 2000:
- Scalar functions.
- Inline table-valued functions.
- Multistatement table-valued functions.
Scalar functions return a single data value (not a table) with RETURNS clause. Scalar functions can use all scalar data types, with exception of timestamp and user-defined data types. Inline table-valued functions return the result set of a single SELECT statement. Multistatement table-valued functions return a table, which was built with many TRANSACT-SQL statements.
User-defined functions can be invoked from a query like built-in functions such as OBJECT_ID, LEN, DATEDIFF, or can be executed through an EXECUTE statement like stored procedures.
No comments:
Post a Comment