The Create Stored Procedures module provides you with the instruction and server hardware to develop your hands on skills in the defined topics. This module includes the following exercises:
- Insert, Update and Delete Data in tables using Stored Procedure
- Update Table Data using Stored Procedure
- Delete Table Data using Stored Procedure
Exercise 1 - Insert, Update and Delete Data in tables using Stored Procedure
In this exercise, you will learn the following in Microsoft SQL Server 2008 R2:
Insert data into tables by creating a stored procedure through T-SQL Update table data by creating a stored procedure through T-SQL Delete table data by creating a stored procedure through SQL Server Management Studio
Exercise 2 - Update Table Data using Stored Procedure
In this task, you will create the stored procedure spupdateemployee using Transact SQL query. The stored procedure dbo.spupdatemployee accepts the Id and address of the employee. It then updates the address field of the dbo.employee table for the given employee id using an UPDATE statement.
Exercise 3 - Delete Table Data using Stored Procedure
In this task, you will create the stored procedure spDeleteemployee using the SQL Server Management System (SSMS). The stored procedure dbo.spDeleteemployee accepts the DepartmentCode as an input parameter. It then deletes the employee records from the dbo.Employee table for the given department code.
See the full benefits of our immersive learning experience with interactive courses and guided career paths.