Kursusindhold
Module 1 – Variables and control structures
In this module you’ll learn to use variables and control structures in T-SQL. You’ll learn how to declare, initiate and use variables. You’ll learn to use the build-in control structures and how to use cursors is introduced. After this module you’ll have a good understanding of using programming in T-SQL.
The following topics are presented:- Declaring and using variables
- Table variables
- Control structures and code blocks
- Introduction to cursors
Modul 2 – User defined functions
In this module you’ll learn to create user defined functions. You’ll learn to create scalar functions that resembles classic functions and you’ll learn to the use the more specialised, but very useful, table-values functions. After this module you’ll be able to solve complex cases by using user defined functions.
The following topics are presented:- Creating- and using scalar functions
- Creating- and using table-valued functions
- Advantages of functions
Modul 3 – Stored Procedures
In this module you’ll learn to use both simple stored procedures, but also stored procedures with input- and output parameters. You’ll learn the benefits and disadvantages of using stored procedures and you’ll learn to optimize your code.
After this module you an able to create and implement stored procedures. Also, you’ll have a good understanding of how to use them optimally.
The following topics are presented:- Creating stored procedures
- Stored procedures and parameters
- Optimizing stored procedures
- Dynamic SQL
Modul 4 – Error handling in T-SQL code
In this module you’ll learn to implement robust code using error handling. You’ll learn different ways of implementing error handling in your code. Advantages/disadvantages using the different techniques are discussed. After the module you’ll be able to develop code taking care of errors in an appropriate way.
The following topics are presented:- Error handling with RAISERROR
- Error handling with the @@ERROR variable
- Error handling with TRY CATCH
- Modern Error handling with THROW
Module 5 – Transactions
In this module you’ll learn how to handle transactions in a database. You’ll learn how to create user defined transactions and how to secure, that related updates are handled properly. After this module you’ll be able to manage updating data efficiently.
The following topics are presented:- Transactions and autocommit
- User defined transactions
- User defined transactions and error handling
- User defined transactions best practice
Module 6 – Implementing Triggers
In this module you’ll learn how to implement DML triggers in tables and views. You’ll learn how to create triggers and implement advanced business logic. After this module you have obtained a decent knowledge of using triggers in databases.
The following topics are presented:- Insert trigger
- Update trigger
- Delete trigger
- Instead Of trigger
Module 7 – Introduction to Index
In the module you’ll get an introduction to the classical types of indexes. You’ll learn the difference between a clustered and a non-clustered index. After this module you have obtained a basic knowledge about indexes and implementing them.
The following topics are presented:- Advantages and drawbacks to index
- Clustered index
- Non-clustered index
- Covering index
- Execution plans