Course Highlights
  • Understand what a stored procedure is and how it differs from other types of SQL queries.
  • Understand how to pass parameters to and from stored procedures.
  • Know how to use variables and control structures such as IF/ELSE and WHILE loops within stored procedures.
  • Learn how to debug, that is troubleshoot, a stored procedure.
  • Setup transactions, detect errors, and automatically rollback changes
  • Understand how to use cursors in stored procedures.
Curriculum

7 Topics
Welcome to the Course
What is a Stored Procedure and why do we need them?
Creating Your First Stored Procedure
How to take this course
Introduction Quiz
Create Your Own Stored Procedure - Challenge
Create Your Own Stored Procedure - Answer

6 Topics
Download SQL Server
Install SQL Server
Download and Install SSMS
Download Sample Databases
Restore Sample Databases
Setup Interactive Debugging

4 Topics
Introduction
Parts of a Stored Procedure
Defining a Stored Procedure
Do you have any questions?

4 Topics
What is Debugging?
Interactive Debugging with Visual Studio
Debugging Assignment (Walk Through)
Debugging Quiz

15 Topics
Working with Variables and Print
BEGIN END Code Blocks
IF THEN Logic
Programming using IF THEN
WHILE Loops
WHILE Loops Example - Counting to 10
Programming While Loops - Counting by Twos
WHILE Loops Example - Creating Weekly Calendar
WHILE Loops Example - Using the BREAK statement
Programming While Loops - Processing Strings
WAITFOR Statement
GOTO and Labels
RETURN
Programming Concepts Quiz
Programming Concepts Assignment

8 Topics
Unstructured Error Handling using @@ERROR
Unstructured Error Handling Example
Structured Error Trapping with TRY and CATCH
TRY CATCH Example
Error Catching Quiz
Error Handling Assignment
Logging Errors
Error Handling and Logging Assignment

9 Topics
Overview
Input and Output Parameters
Input and Output Parameter Examples
Creating LogWrite using Parameters
Using LogWrite in a Stored Procedure
Returning Results with SELECT
Return Codes
Creating and Executing Stored Procedures Quiz
Creating and Executing Stored Procedures Assignment

6 Topics
Transactions
Introduction to Cursors
ISO versus Non-ISO Cursor Syntax
FETCH Command
Case Study
Cursors Assignment

1 Topic
Bonus Lecture

  Write a Review

EssentialSQL: Stored Procedures Unpacked - Code in TSQL

Go to Paid Course