📜  SQL 代码示例中的表值函数

📅  最后修改于: 2022-03-11 15:05:19.362000             🧑  作者: Mango

代码示例1
CREATE FUNCTION udfProductInYear (
    @model_year INT
)
RETURNS TABLE
AS
RETURN
    SELECT 
        product_name,
        model_year,
        list_price
    FROM
        production.products
    WHERE
        model_year = @model_year;
Code language: SQL (Structured Query Language) (sql)