Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql output parameters

CREATE PROCEDURE uspFindProductByModel (
    @model_year SMALLINT,
    @product_count INT OUTPUT
) AS
BEGIN
    SELECT 
        product_name,
        list_price
    FROM
        production.products
    WHERE
        model_year = @model_year;

    SELECT @product_count = @@ROWCOUNT;
END;
Code language: SQL (Structured Query Language) (sql)
Source by www.sqlservertutorial.net #
 
PREVIOUS NEXT
Tagged: #sql #output #parameters
ADD COMMENT
Topic
Name
2+9 =