Your company operates a chain of stores and maintains its business information in a SQL Server database. You want to create a procedure that returns the dates of the orders that were fulfilled by a specified value. By default, when no store is specified, the procedure should return the information for the store with the ID of 001. Which of the following procedure definitions should you use?

Your company operates a chain of stores and maintains its business information in a SQL Server database. You want to create a procedure that returns the dates of the orders that were fulfilled by a specified value. By default, when no store is specified, the procedure should return the information for the store with the ID of 001. Which of the following procedure definitions should you use?


Answer: – CREATE PROCEDURE Sale_dat @p1 int = 001, @p2 int AS SELECT OrderDate FROM Sales WHERE StoreID = @p1 AND Quantity > @p2

(There are various syntax errors in the other three detractors.)