RelationalDBDesign
SiteMap
Business Rules
Cursors Views
Database Creation
SQL Monitoring
Database Web Apps
Data Manipulation
Access Features
Building Access DB
Stored Procedures
«Prev
Next»
Business Rules
Transaction Locking
Transaction Isolation - Quiz
Error Handling Testing
Server Interaction
Assign Use Variables
SQL Raising Errors
SQL Server Functions
SQL-Server Triggers
SQL Triggers-Quiz
Enforcing Business Rules
Creating Triggers - Exercise
Testing SQLserver Trigger
Stored Procedures
What is SP
enforcing Business Rules
Creating SP
User Defined SP
Stored Procedures - Exercise
Modifying Procedures
Deleting Stored Procedures
System Extended SP
Error Handling
Using Output Parameters
Executing Stored Procedures
Testing Stored Procedures
Different SP Conclusion
Stored Procedure - Quiz
Accessing Remote Data
Enterprise Manager Server
Adding Remote Login
Using Output Parameters - Exercise
Using output parameters and creating stored procedures with output parameters
Objective:
Practice creating a stored procedure with an output parameter.
Exercise Scoring
This exercise is worth a total of 25 points. You will receive 25 points for accurately creating the Transact-SQL statement that creates a stored procedure with an output parameter, as described in the instructions.
Instructions
Build on the last exercise and construct a stored procedure, also named
usp_GetLastName
, that accepts two input parameters, the original one named
EmployeeID
and a new one named
EmployeeStatus (
with a data type of
int
). Make sure that the stored procedure retrieves the last name of the employee using the
SELECT
Transact-SQL statement. Also make the
EmployeeStatus
parameter an output parameter.
Submitting the exercise
Type or paste your Transact-SQL statement into the text box below, then click
Submit
to submit the course and view a Results page.
Submit