Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

SQL Multiple Parameterized Procedures

-- Creating the stored procedure with cus_id and max_amount as parameters

CREATE PROCEDURE order_details @cus_id INT, @max_amount INT AS
SELECT Customers.customer_id, Customers.first_name, Orders.amount
FROM Customers
JOIN Orders
ON Customers.customer_id = Orders.customer_id
where Customers.customer_id = @cus_id AND Orders.amount < @max_amount;
 
PREVIOUS NEXT
Tagged: #SQL #Multiple #Parameterized #Procedures
ADD COMMENT
Topic
Name
7+5 =