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.