Querying Data with T-SQL from SQL Server

Paths

Querying Data with T-SQL from SQL Server

Authors: Ami Levin, Tamara Pattinson, Xavier Morera, Jared Westover, Andrew McSwiggan

T-SQL is Microsoft's implementation of SQL (Structured Query Language) used to query and manage data in the SQL Server relational database. This skill will teach you how to use... Read more

What You Will Learn

  • Querying data with the SELECT statement
  • Filtering data with the WHERE clause
  • Combining data with JOINs
  • Aggregating data
  • Inserting, updating, and deleting data

Pre-requisites

  • Relational database literacy

Beginner

Learn to use the SELECT statement, along with JOINs and WHERE clauses, to create organized projections of data stored in SQL Server.

Querying Data Using T-SQL

by Ami Levin

Sep 19, 2019 / 2h 7m

2h 7m

Start Course
Description

SQL can seem simple enough to the unsuspecting eye, but without a solid grasp on its core concepts, you can quickly get lost. In this course, Querying Data Using T-SQL, you will gain the ability to query data with T-SQL. More importantly, you will understand exactly how the database processes your queries. This will allow you to write elegant queries, troubleshoot code effectively, and save you months of frustration as you advance on your SQL path. First, you will learn what SQL and T-SQL are, where they came from, and where they are heading. Next, you will discover query execution processing and how everything in SQL revolves around it. Finally, you will explore how to use every clause of the SELECT query, and you will be able to quickly query data yourself, understand exactly how your queries work, and therefore be able to troubleshoot and optimize them. When you’re finished with this course, you will have the skills and knowledge to query data effectively in T-SQL and feel right at home with it!

Table of contents
  1. Course Overview
  2. What Is T-SQL?
  3. Our First SELECT
  4. The FROM Clause
  5. Filtering with WHERE
  6. Grouping Rows
  7. Evaluating SELECT Expressions
  8. Ordering and Paging
  9. Wrapping Up

Combining and Filtering Data with T-SQL

by Tamara Pattinson

Sep 10, 2019 / 3h 10m

3h 10m

Start Course
Description

Are you looking to start out or brush up on your skills in T-SQL? In this course, Combining and Filtering Data with T-SQL, you will learn foundational knowledge of how to work with data and T-SQL. First, you will learn how to format and calculate data, and about logic functions. Next, you will discover how to join data from two or more tables. Finally, you will explore how to aggregate data to find the sum, minimum, maximum, count, and average values, as well as learn about intermediary tables. When you are finished with this course, you will have the skills and knowledge to write queries, validate results from a query, and work with variables.

Table of contents
  1. Course Overview
  2. Setting up the Environment
  3. Shaping Data in a Query with SELECT
  4. Combining Data From Two or More Tables using JOINS
  5. Filtering the Results using WHERE
  6. Limiting the Results with SQL Functions
  7. Using T-SQL Operators
  8. Aggregating Data in a SELECT Query
  9. Simplifying Queries with Intermediary Tables
  10. Summary

Intermediate

Insert, update, and delete data from SQL Server.

T-SQL Data Manipulation Playbook

by Xavier Morera

Sep 27, 2019 / 2h 54m

2h 54m

Start Course
Description

In this course, T-SQL Data Manipulation Playbook, you’ll learn foundational knowledge required to add records, modify data, and remove records in your SQL Server database.

First, you’ll learn how to add data using the INSERT statement. Next, you’ll discover how to modify data using UPDATE, and how to remove data using the DELETE statement.

Moving on, you’ll explore how to maintain database integrity with transactions. Finally, you'll examine some more advanced T-SQL statements that are not that common, but can help you with your daily work.

When you’re finished with this course, you'll have the skills and knowledge of the T-SQL Data Manipulation Language needed to insert, update, and delete data in Microsoft SQL Server.

Table of contents
  1. Course Overview
  2. Working with the T-SQL Data Manipulation Language
  3. Adding Data Using T-SQL Statements
  4. Modifying Data Using T-SQL Statements
  5. Removing Data Using T-SQL Statements
  6. Maintaining Data Integrity with Transactions
  7. Using Advanced T-SQL Techniques
  8. Final Takeaway

Capturing Logic with Stored Procedures in T-SQL

by Jared Westover

Oct 24, 2019 / 3h 7m

3h 7m

Start Course
Description

Perhaps you’re starting out or have been working with stored procedures for years. Maybe you want to take your understanding of store procedures in SQL Server to the next level. In this course, Capturing Logic with Stored Procedures in T-SQL, you will learn foundational knowledge for developing powerful stored procedures. First, you will learn why utilizing stored procedures in SQL Server is paramount to executing maintainable code. Along the way, learning why using temporary objects might reduce complexity. Next, you will discover methods for adding queries to your stored procedures. Finally, you will explore several methods to optimize the performance of your stored procedures. When you’re finished with this course, you will have the skills and knowledge necessary to consistently deliver optimal stored procedures in SQL Server.

Table of contents
  1. Course Overview
  2. Exploring the Benefits of Stored Procedures
  3. Creating Our First Stored Procedure
  4. Setting up Queries in Stored Procedures
  5. Optimizing Stored Procedure Performance
  6. Building Stored Procedures in the Real World

T-SQL Functions Playbook

by Andrew McSwiggan

Jan 23, 2020 / 3h 4m

3h 4m

Start Course
Description

As a data professional you often need to write queries to summarize and gain insight from data. In this course, T-SQL Functions Playbook, you will learn how to use powerful functions inside your T-SQL queries to reshape and interrogate data. First, you will learn how to aggregate data with aggregation functions. Next, you will see how to merge data from multiple queries from within and outside of your local SQL Server environment. Finally, you will discover how to apply logic calculations and formatting to transform data and make it more readable. When you have completed this course, you will have the skills to take control of and analyze your data. Software required: SQL Server Management Studio.

Table of contents
  1. Course Overview
  2. Creating Measures with Aggregation Functions
  3. Ranking Data with RANK and PARTITION
  4. Aggregating and Summarizing Data with Functions
  5. Substituting a Table Reference with a ROWSET Function
  6. Query Data with Inline Queries and Scalar Functions
  7. Query Data with Static Value Functions
  8. Implementing IF Then Logic
  9. Combining Queries with COALESCE
  10. Calculating Values Using String Functions
  11. Calculating Values Using Numeric Scalar Functions

Advanced

Create SQL Server database objects, such as functions and stored procedures, to capture reusable query logic.

Querying JSON, XML, and Temporal Data with T-SQL

by Xavier Morera

Oct 23, 2019 / 1h 50m

1h 50m

Start Course
Description

Querying structured data is the most common scenario with SQL Server. However, there are cases where the schema is not known up front or more flexibility is needed. Additionally, sometimes it is required to know the value of a particular field at a specific point in time. In this course, Querying JSON, XML, and Temporal Data with T-SQL, you’ll gain the ability to use JSON and XML to store, modify, and query semi-structured data. First, you’ll learn how to work with JSON in SQL Server. Next, you’ll discover how to work with XML. Finally, you’ll explore how to retrieve values at any point in time with temporal tables. When you’re finished with this course, you’ll have the skills and knowledge of JSON, XML, and temporal tables needed to work with semi-structured data and historic data in SQL Server. Software required: Microsoft SQL Server.

Table of contents
  1. Course Overview
  2. Querying JSON with T-SQL
  3. Querying XML Data with T-SQL
  4. Utilizing Temporal Tables
  5. Final Takeaway

Handling Errors in T-SQL

by Jared Westover

Jul 16, 2019 / 2h 46m

2h 46m

Start Course
Description

Perhaps you’re starting out or have been putting off learning error handling for years. Maybe you want to take your understanding of error handling in SQL Server to the next level. In this course, Handling Errors in T-SQL, you will gain the ability to handle exceptions in SQL Server. First, you will learn why handling errors in T-SQL is critical to writing quality code. Along the way, learning why you want to control the outcome of your scripts. Next, you will discover how transactions are woven into the fabric of SQL Server and how to manage them efficiently. Finally, you will explore the most important error handling methods. When you’re finished with this course, you will have the skills and knowledge necessary to consistently handle exceptions in T-SQL.

Table of contents
  1. Course Overview
  2. Getting Started with Error Handling in T-SQL
  3. Exploring Transactions in SQL Server
  4. Examining Error Handling Methods
  5. Handling Errors in the Real World
Offer Code *
Email * First name * Last name *
Company
Title
Phone
Country *

* Required field

Opt in for the latest promotions and events. You may unsubscribe at any time. Privacy Policy

By providing my phone number to Pluralsight and toggling this feature on, I agree and acknowledge that Pluralsight may use that number to contact me for marketing purposes, including using autodialed or pre-recorded calls and text messages. I understand that consent is not required as a condition of purchase from Pluralsight.

By activating this benefit, you agree to abide by Pluralsight's terms of use and privacy policy.

I agree, activate benefit