Question: Scenario: In a database with a Products table containing columns ProductID, ProductName, Price, and StockQuantity, which SQL stored procedure would update the price of a
Scenario: In a database with a Products table containing columns ProductID, ProductName, Price, and StockQuantity, which SQL stored procedure would update the price of a product based on its ProductID?
Context:
Products Table Columns:
ProductID
ProductName
Price
StockQuantity
A
CREATE PROCEDURE UpdateProductPrice
@ProdID INT,
@NewPrice DECIMAL
AS
BEGIN
UPDATE Products SET Price @NewPrice WHERE ProductID @ProdID;
END;
B
CREATE PROCEDURE ModifyPrice
@ID INT,
@NewVal DECIMAL
AS
BEGIN
UPDATE Products SET Price @NewVal WHERE ProductID @ID;
END;
C
CREATE PROCEDURE AdjustProduct
@ProductID INT,
@NewPrice DECIMAL
AS
BEGIN
UPDATE Products SET Price @NewPrice WHERE ProductID @ProductID;
END;
D
CREATE PROCEDURE SetPrice
@ID INT,
@UpdatedPrice DECIMAL
AS
BEGIN
UPDATE Products SET Price @UpdatedPrice WHERE ProductID @ID;
END;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
