560 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
Search our website
We also send out useful tips in a monthly email newsletter ...
Inline and multi-statement table-valued functions Part four of a four-part series of blogs |
---|
This blog shows you how to create table-valued functions in SQL (ie functions which return a table of data!).
This blog is part of our SQL tutorial. If you're looking for a classroom course, have a look at our SQL classroom-based training. |
I use table-valued functions throughout my systems, but it's as well to know of a few limitations they share with normal scalar functions. These are as follows:
Limitation | Notes |
---|---|
No "side-effects" allowed | Functions that you write can't insert, delete or update permanent tables. |
Calling stored procedures is not possible | Functions can't call normal stored procedures (although they can call extended stored procedures and other functions). |
Non-deterministic functions are barred | You can not use certain non-deterministic system functions such as RAND (a function to generate random numbers). |
No temporary tables | You can not use temporary tables within a user-defined function. |
Limited Error Trapping | You can not use TRY / CATCH blocks in user-defined functions. |
It's unlikely that any of the above should trouble you, but I thought I ought to include this information for the sake of completeness!
Parts of this blog |
---|
|
Some other pages relevant to the above blogs include:
Kingsmoor House
Railway Street
GLOSSOP
SK13 2AA
Landmark Offices
99 Bishopsgate
LONDON
EC2M 3XD
Holiday Inn
25 Aytoun Street
MANCHESTER
M1 3AE
© Wise Owl Business Solutions Ltd 2023. All Rights Reserved.