Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql server output parameter

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;
Comment

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)
Comment

PREVIOUS NEXT
Code Example
Sql :: json object to column value in sql server 
Sql :: sql less than operator 
Sql :: sql create table as 
Sql :: mysql select empty string 
Sql :: one to many sql 
Sql :: sql transaction 
Sql :: insert to first table if field A equals field B from a second table using sql 
Sql :: create domain sql 
Sql :: sql double quotes in string 
Sql :: select sql 
Sql :: oracle alter table 
Sql :: how to generate er diagram in mysql workbench 
Sql :: mysql view 
Sql :: sql where statement 
Sql :: ring MySQL commit updates to the database 
Sql :: identitye atama yapma SQL 
Sql :: INSERT INTO GBP Plus(Index Change) VALUES( AND((SELECT NUMINDEX FROM GBP WHERE IDID-1) - (SELECT NUMINDEX FROM GBP WHERE ID=ID )) 
Sql :: sqlalchemy datetime utcnow 
Sql :: delphi split datetime 
Sql :: sqlite3 get data from table c 
Sql :: where in clause tsql 
Sql :: create backup 
Sql :: sql multiple column 
Sql :: mysql zerofill 
Sql :: how to get employee having maximum experience in mysql 
Sql :: db: vertex.nedb() 
Sql :: drop unique constraint 
Sql :: odoo there is no primary key for referenced table "res_users" 
Sql :: postgresql using reserved word as column name 
Sql :: sql find column with trailing space 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =