Stairway to T-SQL Beyond The Basics

Stairway to T-SQL: Beyond The Basics Level 7: Controlling the Flow of Your T-SQL

When you are writing TSQL code there are times when you want to perform the same logic over and over again. To accomplish this you can used the WHILE keyword. There are other times when you want to perform a conditional test and depending on the results of the test you execute one code block for the TRUE condition and possibly a different code block when the condition is FALSE. When you need to conditionally execute code based on the outcome of a condition you can used the IF keyword. In this Stairway level I will be discussing how to use the WHILE and IF constructs to control the flow of your TSQL code.

Blogs

Upgrading SQL Server Containers on the Laptop

By

I don’t have SQL Server installed on my laptop. In an effort to keep...

How to Find Expensive Queries in Amazon Redshift

By

Slow-running queries can degrade your Redshift cluster’s performance and lead to increased costs. Identifying...

The Notification Trap: How Input Fatigue Is Killing Deep Work in Tech

By

If you've been here before, you know this blog is usually about SQL Server,...

Read the latest Blogs

Forums

Wa cs Qlola bri

By advanceesthe

Butuh panduan penggunaan QLola BRI? Melalui whatsapp 08136035412 Butuh panduan penggunaan QLola BRI? Hubungi...

Layanan wa Qlola bri

By advanceesthe

Layanan support QLola BRI tersedia melalui WhatsApp 08136035412 untuk membantu berbagai kebutuhan Anda, mulai...

Pusat bantuan qlola bri resmi

By advanceesthe

Layanan bantuan QLola BRI melalui whatsapp 628136035412 Layanan bantuan QLola BRI kini lebih mudah...

Visit the forum

Question of the Day

How Long is a Long I/O?

In SQL Server 2025, a long I/O is recorded in the error log with message 833. How long much an I/O request be outstanding before this message is written to the log?

See possible answers