Book Image

SQL Server 2014 Development Essentials

By : Basit A. Masood-Al-Farooq
Book Image

SQL Server 2014 Development Essentials

By: Basit A. Masood-Al-Farooq

Overview of this book

Table of Contents (14 chapters)
SQL Server 2014 Development Essentials
About the Author
About the Reviewers

Chapter 3. Data Retrieval Using Transact-SQL Statements

The primary purpose of creating databases and tables in SQL Server is to store data and make that data available to users and application queries. Like any other Relational Database Management System (RDBMS), retrieval of data from a SQL Server database is a relatively straightforward task. In this chapter, you will learn how to get data from the databases using the Transact-SQL (T-SQL) SELECT statement. After reading through the chapter, you will be able to understand the following:

  • Transact-SQL SELECT, FROM, and WHERE clauses

  • Use a Transact-SQL function in a query

  • Multiple table queries using UNION, EXCEPT, INTERSECT, and JOINs

  • Use subqueries and CTEs to perform advanced queries

  • Organizing, grouping, and pivoting data

  • Use of the Transact-SQL analytic window functions


    This chapter contains a large number of example T-SQL queries, all of which require the AdventureWorks2012 database, which is available for download from http://msftdbprodsamples...