Creating a table-valued function in SQL server



The following statement example creates a table-valued function that returns a list of products including product name, model year and the list price for a specific model year.

CREATE FUNCTION exFUNCTION (
@y INT
)
RETURNS TABLE
AS
RETURN
SELECT
x,
t,
y
FROM
products
WHERE
y = @y

0 Comment's

Comment Form

Submit Comment