Writing TSQL

TSQL for Beginners (Redgate University)

TSQL for Beginners (Redgate University)

This free course introduces you to the Transact SQL language implemented in SQL Server and takes you from newbie to a master of SELECT statements.

The Idempotent TSQL SQLChallenge (28 minutes)

The Idempotent TSQL SQLChallenge (28 minutes)

When writing TSQL, it’s often useful to make your TSQL idempotent – a fancy word, which in the case of databases really just means: you can run the command again and again and it will make sure that you have the intended effect, without causing problems by being run more than once.

A Query Writing SQLChallenge: The Most Unique Names (23 minutes)

A Query Writing SQLChallenge: The Most Unique Names (23 minutes)

Flex your T-SQL skills: you’re challenged to write four different (but related) queries in this query writing challenge.

A Dynamic SQLChallenge (32 minutes)

A Dynamic SQLChallenge (32 minutes)

In this challenge, you are tasked with editing a stored procedure to gather data from multiple databases. What’s the most efficient way to do it? Try your hand at the challenge, then check out three different suggested solutions.

Tune the 'Peak Years' Procedure - SQLChallenge (52 minutes)

Tune the 'Peak Years' Procedure - SQLChallenge (52 minutes)

Ready to tune some TSQL? In this challenge, you’re given a database to restore. You’ll create two indexes and a constraint in the database– and you aren’t allowed to change those.