Question: SQL Code Troubleshooting Given the following code, troubleshoot the errors by answering the questions below. CREATE PROCEDURE RepSales ( IN repid int, in startdate varchar
SQL Code Troubleshooting
Given the following code, troubleshoot the errors by answering the questions below.
CREATE PROCEDURE RepSales IN repid int, in startdate varcharout enddate varchar
BEGIN
#Get all sales by Month and user with bonus function
Select monthnamepurchasedate MonthName, Rep,
sumrevenue as Revenue,
salesbonussumrevenue as bonus from vwRepSales
where purchasedate between startdate and enddate
and idrepifnullrepididrep;
END$$
DELIMITER ;
Question points
Which statement allows the stored procedure to return the entire result set if nothing is provided for the repid parameter.
Question options:
idrepifnullrepididrep
idrep
idrepifnullrepid
idrep is not null;
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
