Transact-SQL 2016/2019: Insert, Update, and Delete Data

Specialist T-SQL coding for data modification: INSERT, UPDATE, and DELETE

This course is narrowly focused on a specific portion of Transact-SQL. The course covers data modification topics namely INSERT, UPDATE, and DELETE by using different T-SQL statements. It discusses many scenarios of data modification including from stored procedure result set(s), joins, subqueries, nondeterministic updates (and how to handle them), UPDATE based on a variable, table expressions, as well as the concept of UPDATE All-at-Once. The course is fully hands-on using a supplied sample database. For your convenience and smooth learning experience, a custom user interface has been provided for you to execute all your SQL codes outside of SQL Server Management Studio (SSMS)

What you’ll learn

  • Insert single and multiple rows into a table by using the INSERT VALUES statement.
  • Insert the result of a query into a table by using the INSERT SELECT statement.
  • Insert the result of a stored procedure or a dynamic batch into a table by using the INSERT EXEC statement.
  • Use a query result to create and populate a table by using the SELECT INTO statement.
  • Use the UPDATE statement to modify rows in a table.
  • Update data by using joins.
  • Describe the circumstances in which you get nondeterministic updates.
  • Update data through table expressions such as Common Table Expression (CTE) or subqueries.
  • Update data by using variables.
  • Describe the implications of the all-at-once property of SQL on updates.
  • Use the DELETE and TRUNCATE statements to delete rows from a table.
  • Use a DELETE statement based on joins.
  • Use a DELETE statement based on table expressions such as CTE and subquery.

Course Content

  • Introduction –> 9 lectures • 1hr 8min.
  • Updating Data –> 7 lectures • 1hr 5min.
  • Deleting Data –> 1 lecture • 26min.

Transact-SQL 2016/2019: Insert, Update, and Delete Data

Requirements

  • To be able to perform the hands-on exercises, you need an instance of SQL Server 2016 or 2019 and SQL Server Management Studio (SSMS).
  • You need some experience writing Transact-SQL code.
  • You need to install the sample database AcotexDB.
  • You should have an understanding of filtering and sorting data.
  • An understanding of creating tables and enforcing data integrity.

This course is narrowly focused on a specific portion of Transact-SQL. The course covers data modification topics namely INSERT, UPDATE, and DELETE by using different T-SQL statements. It discusses many scenarios of data modification including from stored procedure result set(s), joins, subqueries, nondeterministic updates (and how to handle them), UPDATE based on a variable, table expressions, as well as the concept of UPDATE All-at-Once. The course is fully hands-on using a supplied sample database. For your convenience and smooth learning experience, a custom user interface has been provided for you to execute all your SQL codes outside of SQL Server Management Studio (SSMS)

To receive the full benefit from this course you must meet the following requirements:

  • You must have some working experience with T-SQL
  • A familiarity with SSMS is an advantage but not strictly required (you can write and execute your SQL codes exclusively in the custom interface)
  • Must have access to a SQL Server instance (2016/2019)
  • Have some understanding of filtering and sorting data
  • An understanding of creating tables and enforcing data integrity through T-SQL

Every lesson of the course comes with quizzes that test your understanding of the topics. At the end of each section you test your knowledge with review questions (answers are provided). We also provide two Case Scenarios that test your understanding of the topics covered in the whole course.