Skip to main content

Understanding T-SQL Programming Logic

  • Chapter
  • First Online:
Beginning T-SQL
  • 1562 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 44.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Kathi Kellenberger

About this chapter

Cite this chapter

Kellenberger, K., Shaw, S. (2014). Understanding T-SQL Programming Logic. In: Beginning T-SQL. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0046-9_12

Download citation

Publish with us

Policies and ethics