0% found this document useful (0 votes)
29 views

Advanced SQL Training

This 2 day Advanced SQL course covers topics such as stored procedures, variables, parameters, scalar functions, testing conditions, looping, error handling, deleting/updating/inserting data, derived tables, common table expressions, debugging, dynamic SQL, pivots, triggers, temporary tables, table variables, and table-valued functions. The course is limited to 5 people and includes lunch at a local restaurant each day. More details can be found at the provided website URL.

Uploaded by

charbel marun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Advanced SQL Training

This 2 day Advanced SQL course covers topics such as stored procedures, variables, parameters, scalar functions, testing conditions, looping, error handling, deleting/updating/inserting data, derived tables, common table expressions, debugging, dynamic SQL, pivots, triggers, temporary tables, table variables, and table-valued functions. The course is limited to 5 people and includes lunch at a local restaurant each day. More details can be found at the provided website URL.

Uploaded by

charbel marun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Advanced SQL

Classroom training course


2 day course outline

This course covers the following topics (any items marked with a * will be covered if time allows):

Stored procedures Deleting using SQL Derived tables and CTEs

• Creating stored procedures • Ways to drop tables • Using derived tables


• Executing stored procedures • DELETE versus TRUNCATE • Common Table Expressions (CTEs)
• System stored procedures • Multiple CTEs in a single query
Updating data in SQL
Variables Debugging (*)
• The UPDATE statement
• Declaring variables • Updating using joins • Debugging queries and procedures
• SET versus SELECT • Setting breakpoints
• Tricks with variables Inserting data
• So-called global variables Dynamic SQL (*)
• Making tables (SELECT INTO)
• Appending data (INSERT INTO) • Building up dynamic SQL
Parameters and return values
• Inserting individual rows • Executing dynamic SQL
• Passing parameters • Disadvantages of dynamic SQL
• Default values / WHERE clauses Creating tables
• Output parameters Pivots (*)
• Creating tables in SQL
• Using RETURN
• Primary keys and indexes • Assembling data for pivoting
• Adding relationships • Using PIVOT
Scalar functions
• Dynamic column headers
• What they are Transactions
• Writing user-defined functions Triggers (*)
• Beginning a transaction
• Worked examples
• Committing / rolling back • Insert, update and delete triggers
• Pros and cons of scalar functions
• Using generated tables (eg
Temporary tables and table variables INSERTED)
Testing conditions
• Using INSTEAD OF
• Scope (local versus global)
• IF / ELSE statement
• Using temporary tables
• Using CASE where possible
• Creating table variables
• Pros and cons of each approach
Looping

• Syntax of WHILE Table-valued functions (*)


• Breaking out of a loop
• In-line table-valued functions
• Mult-statement table-valued
Error-handling
functions
• Using TRY / CATCH
• System error functions
• Custom error messages

There will be no more than 5 people on the course. All of our public (scheduled) courses include lunch at a local restaurant.
For more information, see www.wiseowl.co.uk/courses/advanced-sql-training.htm.

Wise Owl Business Solutions Ltd (company number 05110386) | Tel: (0161) 883 3606 | Web: https://www.wiseowl.co.uk

You might also like