Summary


User-defined functions are one of the more welcome new features in SQL Server 2000. Scalar functions can be used to perform more complex operations than those provided by the built-in scalar functions. Table-valued functions provide a way to create what are essentially parameterized views and allow you to include them inline in your queries just like a table or view. User-defined functions allow you to create reusable routines that can help to make your SQL code more straightforward and efficient. In this chapter, you have seen how to create and modify scalar functions and inline and multistatement table-valued functions and how they can be invoked and used within your queries. If you are considering converting any existing stored procedures to functions, the guidelines and example presented should offer some help.



Microsoft SQL Server 2000 Unleashed
Microsoft SQL Server 2000 Unleashed (2nd Edition)
ISBN: 0672324679
EAN: 2147483647
Year: 2002
Pages: 503

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net