Home >> FAQs/Tutorials >> SQL Server FAQ

SQL Server FAQs - Transact-SQL Conditional Statements and Loops

By: FYIcenter.com

A collection of 5 FAQs on Transact-SQL language conditional statements and loops. Clear answers are provided with tutorial exercises on IF ... ELSE statements; WHILE loops; statement blocks; BREAK and CONTINUE statements. Topics included in this FAQ are:

  1. How To Use "IF ... ELSE IF ... ELSE ..." Statement Structures?
  2. How To Use "BEGIN ... END" Statement Structures?
  3. How To Use WHILE Loops?
  4. How To Stop a Loop Early with BREAK Statements?
  5. How To Skip Remaining Statements in a Loop Block Using CONTINUE Statements?

Please note that all answers and tutorials are based on MS SQL Server 2005. To follow tutorials in this collection, you should connect to SQL server as a regular user who has enough permissions to run simple Transact-SQL statements. Some tutorial exercises use the sample database AdventureWorksLT provided by Microsoft.

For questions on Transact-SQL language, see the other FAQ collections.

(Continued on next topic...)

Related Articles:


Other Tutorials/FAQs:


Related Resources:


Selected Jobs: