INLINE TABLE VALUE FUNCTIONS

A simplified version of a table value function with one SQL statement. It is not necessary to declare the
output table format. The following example shows how to declare an inline table value function with one
parameter, and how to call it from a SELECT statement.

Example:

CREATE FUNCTION getOrder ( @orderid int ) 
RETURNS TABLE
as RETURN ( select * from orders where orderid in (@orderid ) )
select * from getOrder(10248) as OrderInfo
Was this article helpful?
0 out of 0 found this helpful

Comments

1 comment
  • Er dette eksempel også gældende for 2022 Winter update 2?

    0

Please sign in to leave a comment.