Microsoft SQL Server Programming


5 days


Exeter – Devon, Bristol, Gloucester or onsite at your premise.


This 5 day course is intended for students new to querying with Microsoft SQL Server products and who need a total immersion in the subject on the SQL Server platform. This is a comprehensive and intensive course with plenty of illustrated examples and augmented with practical hands-on exercises. All of the new and enhanced Transact-SQL features introduced in SQL Server (such as Window Functions) are included here to enable delegates to fully leverage the power of this latest release of Microsoft’s flagship database product. To cater for the more experienced SQL Server developer, this course can also be tailored to include only the material required.


Students should ideally be familiar with basic programming concepts, and understand the fundamental design of relational databases and data normalization.


Upon successful completion of this course, students will be able to:

  • Identify the Primary Components of a Typical SQL Server Installation
  • Identify the Tools Available in SQL Server
  • Use SQL Server Management Studio
  • Understand the Components of Transact-SQL (T-SQL)
  • Retrieve, Filter and Sort Data
  • Work with the Native SQL Server Data Types
  • Use Variables
  • Work with SQL Server Date and Time Data
  • Query Data from Multiple Tables by Using Joins
  • Summarize and Group Data
  • Use Window Functions for Ranking and Aggregating Data
  • Combine and Limit Result Sets
  • Work with Subqueries
  • Use Crosstab Queries
  • Use Common Table Expressions
  • Modify Data with INSERT, DELETE and UPDATE
  • Merge Data with the MERGE Statement
  • Understand and Implement Transactions
  • Understand SQL Server Locks
  • Understand SQL Server Indexes
  • Understand Query Performance Issues
  • Create and Manage Views
  • Control the Flow of Program Execution
  • Create and Implement Stored Procedures
  • Handle Errors and Exceptions
  • Create and Implement User Defined Functions
  • Create and Implement Triggers


1. Introduction to SQL Server Management Studio

  • Identify the Tools and Components of SQL Server
  • Identifying the Elements of SQL Server Management Studio (SSMS)
  • Objects in a SQL Server Database
  • Synonyms
  • Database Diagrams
  • Components of a SQL Server Database Table

2. Introduction to SQL and Transact-SQL

  • ANSI-SQL and Transact-SQL (T-SQL)
  • Categories of SQL Statements
  • T-SQL Scripts
  • Using Batches
  • Adding Comments to T-SQL Code

3. Using the SELECT Statement to Retrieve Data

  • Examine the Basic Syntax of the SELECT Statement
  • Using String Literals and Expressions
  • Retrieving Columns of Data from a Table
  • Using Aliases for Column Names

4. Retrieving Specific Rows of Data Using the WHERE Clause

  • How to Use the WHERE Clause
  • Overview of Operators
  • Filter Data by Using Comparison Operators
  • Filter Data by Using String Comparisons
  • Filter Data by Using Logical Operators
  • Filter Data Using a Range of Values
  • Filter Data Using a List of Values
  • Working with NULL Values
  • Introducing Native SQL Server Functions
  • Functions Relating to NULL Values

5. Working with SQL Server Data Types

  • Native SQL Server Data Types
  • Working with Variables
  • Data Type Precedence
  • Implicit Data Type Conversions
  • Explicit Data Type Conversion Functions
  • Querying and Modifying Date and Time Data
  • Native SQL Server Date and Time Functions

6. Formatting and Sorting Result Sets

  • Sorting Data Using the ORDER BY Clause
  • Eliminating Duplicate Rows with DISTINCT
  • Using the CASE Expression

7. Querying Data from Multiple Tables by Using Joins

  • Introduction to Joins
  • Using Inner Joins
  • Using Outer Joins
  • Using Cross Joins
  • Using Aliases for Table Names
  • Joining More than Two Tables
  • Joining a Table to Itself (Self Join)
  • Using Non-Equi Joins

8. Summarizing Data Using Aggregate Functions

  • Using Aggregate Functions Native to SQL Server
  • Using Aggregate Functions with NULL Values
  • Grouping Summarized Data with GROUP BY
  • Filtering Grouped Data Using the HAVING Clause
  • Using the ROLLUP and CUBE Operators

9. Window Functions

  • Aggregate Window Functions
  • Ranking Window Functions
  • Analytic Window Functions

10. Combining and Limiting Result Sets

  • Combining Result Sets Using the UNION Operator
  • Limiting Result Sets Using the EXCEPT and INTERSECT Operators
  • Identifying the Order of Precedence of UNION, EXCEPT, and INTERSECT
  • Limiting Result Sets Using the TOP Operator
  • Using OFFSET/FETCH NEXT Filters
  • Limiting Result Sets Using the TABLESAMPLE Operator

11. Working with Subqueries

  • Introduction to Subqueries
  • Using Subqueries as Expressions and Derived Tables
  • Scalar versus Tabular Subqueries
  • Using Correlated Subqueries
  • Using EXISTS with Correlated Subqueries
  • Using the APPLY Operator
  • Subqueries versus Joins
  • Subqueries versus Temporary Tables

12. Crosstab Queries

  • Using the PIVOT Operator
  • Using the UNPIVOT Operator

13. Common Table Expressions

  • Introduction to Common Table Expressions
  • Using Common Table Expressions
  • Recursive Queries Using Common Table Expressions
  • Techniques for Querying Hierarchical Data

14. Inserting Data into Tables

  • Inserting a Single Row into a Table
  • Inserting Multiple Rows into a Table
  • Inserting Values into Identity Columns
  • The SEQUENCE Object
  • Differentiating Various INSERT Statements
  • Using the OUTPUT Clause with the INSERT Statement

15. Deleting Data from Tables

  • Deleting Rows from a Table
  • Truncating a Table
  • Deleting Rows Based on Data in Other Tables
  • Using the OUTPUT Clause with the DELETE Statement

16. Updating Data in Tables

  • Updating Rows in a Table
  • Updating Rows Based on Data in Other Tables
  • Using the OUTPUT Clause with the UPDATE Statement

17. Merging Data

  • The MERGE Statement
  • Practical Examples of Using MERGE

18. Transactions and Locking

  • What Is a Transaction?
  • How SQL Server Modifies Data in Tables
  • Managing Transactions
  • Nested Transactions
  • Transaction Isolation Levels
  • SQL Server Locking Architecture
  • Managing Locks

19. Performance Considerations for Writing Queries

  • How SQL Server Processes T-SQL Queries
  • Execution Plans
  • Dynamically Generating T-SQL Code
  • Understanding SQL Server Index Architecture
  • Creating and Using Non-Clustered Indexes
  • Creating and Using Clustered Indexes
  • Writing Efficient Search Arguments

20. Implementing Views

  • Overview of Views
  • Creating and Modifying a View
  • Considerations When Creating Views
  • Examining the Impact of Using SELECT * in Views
  • Restrictions for Modifying Data by Using Views
  • Indexed Views
  • Partitioned Views

21. Controlling Program Execution

  • Control-of-Flow Language Statements
  • Logical Functions

22. Implementing Stored Procedures

  • Overview of Stored Procedures
  • How Stored Procedures Are Executed by SQL Server
  • Creating and Using a Stored Procedure
  • Parameterising Stored Procedures
  • Returning Values from a Stored Procedure
  • Using Table Valued Parameters (TVPs)
  • Controlling Execution Context

23. Error Handling

  • Using @@ERROR
  • Using TRY…CATCH
  • Using the THROW Statement

24. Implementing User Defined Functions

  • Overview of User Defined Functions (UDFs)
  • Creating and Modifying UDFs
  • Restrictions When Creating UDFs
  • Implementing Different Types of UDFs

25. Implementing Triggers

  • Overview of Triggers
  • How Triggers Work
  • AFTER Triggers
  • INSTEAD OF Triggers
  • Overview of DDL Triggers

Appendix 1. Querying Metadata

  • Different Categories of Data
  • Grouping Concepts Related to Different Categories of Data
  • Understanding Metadata
  • Querying Metadata by Using Views
  • Querying Metadata by Using Stored Procedures
  • Querying Metadata by Using Functions
  • Metadata Discovery in SQL Server 2012


For more information or to book onto our Microsoft SQL Server Programming training course please contact us on 01392 824 022 or email

If there is a Microsoft SQL Server course that is not listed on our site, that you are interested in attending then please let us know and we can arrange one to one training onsite with our Trainer.

Still not convinced?
We can help you!

Fill out the form below and one of our IT specialists will contact you.

Please enter the following code:captcha




PhoneEmailTwitterAME Support ToolApple Mac Support tool