Skip to Content
T-SQL Querying: Writing a SELECT Statement
on-demand course

T-SQL Querying: Writing a SELECT Statement

with John Deardurff
December 2018
Advanced
48m
English
Apress
Closed Captioning available in English

Overview

This video provides you with the knowledge to write SELECT statements to retrieve data from a SQL Server database. The video begins with an explanation of fields and records, followed by the anatomy of a SELECT statement. It continues with how to use a WHERE clause to filter specific records into the result set. Since a field can store various data types, the filter section shows how to work with those data types. Finally, there is coverage of how to sort and order a result set. 
 
Also covered is the four-part naming convention for tables in SQL Server. A proper understanding of table naming is important as queries become more involved and complex. Table and column aliases are covered as well, which are names that you can provide as substitutes for canonical names that are often long and cumbersome. Aliases provide a level of insulation in your queries from changes to names in the tables and columns that are being queried. 
 
While this video is about T-SQL and includes examples specific to SQL Server, the bulk of what you will learn is applicable to any vendor's implementation of the SQL language. 
 
What You Will Learn
 
  • Query and retrieve data from a SQL Server database
  • Understand the basic structure of a SELECT statement
  • Filter query results to only those records that interest you
  • Sort query results in ascending or descending order
  • Execute queries that answer Top N type business questions
  • Properly reference tables in your queries by using all four parts of a table name
  • Improve readability and maintainability through using alias names
Who This Video Is For
 
T-SQL Querying: Writing a SELECT Statement is aimed at business analysts, developers, and others whose career will benefit from a knowledge of the SQL language for accessing Microsoft SQL Server databases and the data they contain. The video is for anyone working in a SQL Server environment and wanting to derive business value from their organization’s data by analyzing that data, creating reports, or even generating visualizations.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Watch now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Learn T-SQL Querying

Learn T-SQL Querying

Pedro Lopes, Pam Lahoud

Publisher Resources

ISBN: 9781484243336