O'Reilly logo

Microsoft® SQL Server™ 2000 Programming by Example by Carlos Eduardo Rojas, Fernando G. Guerrero

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Benefits of User-Defined Functions

You learned in Chapter 8, "Implementing Business Logic: Programming Stored Procedures," how to create stored procedures, which are similar to the way you create functions in other programming languages. However, using stored procedures from Transact-SQL is not very flexible, because you can use them only with the EXECUTE or INSERT...EXECUTE statements. If you have a stored procedure that returns a single value, you cannot use this procedure inside an expression. If your procedure returns a result set, you cannot use this procedure in the FROM clause of any Transact-SQL statement.

In Chapter 3, "Working with Tables and Views," you learned about views and how to use them anywhere as a replacement for tables. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required