Advertisement

Understanding T-SQL Programming Logic

  • Kathi Kellenberger
  • Scott Shaw
Chapter

Abstract

Even though the primary purpose of T-SQL is to retrieve and manipulate data, like other programming languages, it also contains logic elements. Most of the time you will write T-SQL statements that retrieve or update data, but you can also set up loops and write code with conditional flow. Often database administrators write scripts in T-SQL to perform maintenance tasks that require more than just retrieving or updating data. For example, you might need to write a script that checks the last backup date of all databases on the server or checks the free space of all the databases. Although most administrative tasks are beyond the scope of this book, you may find many uses in your environment for the techniques you will learn in this chapter.

Keywords

Outer Loop Boolean Expression Select Statement Table Variable Identity Column 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Kathi Kellenberger 2014

Authors and Affiliations

  • Kathi Kellenberger
    • 1
  • Scott Shaw
    • 1
  1. 1.ILUnited States

Personalised recommendations