1. Learn
  2. /
  3. Courses
  4. /
  5. Writing Functions and Stored Procedures in SQL Server

Exercise

CREATE PROCEDURE with OUTPUT

Create a Stored Procedure named cuspSumRideHrsSingleDay in the dbo schema that accepts a date and returns the total ride hours for the date passed.

Instructions

100 XP
  • Create a stored procedure called cuspSumRideHrsSingleDay in the dbo schema.
  • Declare @DateParm as the input parameter and @RideHrsOut as the output parameter.
  • Don't send the row count to the caller.
  • Assign the query result to @RideHrsOut and include the RETURN keyword.