SQL Tutorial - How to update data using joins in SQL
Learn how to update data using joins in SQL and much more, in this video we will cover how to perform updates using joins in SQL, how to update multiple columns at the same time, how to update data using CTEs and how to update data within a transaction, we will also cover what sanity checks need to carried when out when performing updates. #beardeddev #sql #data #dataengineering #dataanalysis To follow along with the video you can use the code below: IF OBJECT_ID(N'dbo.Product', N'U') IS NOT NULL DROP TABLE dbo.Product; CREATE TABLE dbo.Product ( ProductKey INT IDENTITY(1, 1) NOT NULL CONSTRAINT PK_Product_ProductKey PRIMARY KEY (ProductKey), Code CHAR(8) NOT NULL CONSTRAINT UN_Product_Code UNIQUE (Code), [Name] VARCHAR(50) NOT NULL, Category VARCHAR(50) NOT NULL, Price DECIMAL(6, 2) NOT NULL, CreatedDate DATETIME2 NOT NULL CONSTRAINT DF_Product_CreatedDate DEFAULT (CURRENT_TIMESTAMP), ModifiedDate DATETIME2 NOT NULL CONSTRAINT DF_Product_ModifiedDate DEFAULT (CURRENT_TIMESTAMP) ); INSERT INTO dbo.Product (Code, [Name], Category, Price) VALUES ('CMP76460', 'Laptop', 'Computing', 399.99), ('CMP73900', 'Monitor', 'Computing', 189.99), ('CMP68194', 'PC', 'Computing', 749.99), ('APP16830', 'Washing Machine', 'Appliances', 519.99), ('APP14936', 'Refridgerator', 'Appliances', 329.99), ('APP19364', 'Cooker', 'Appliances', 689.99), ('TVA50385', 'Television', 'TV & Audio', 179.99), ('TVA50275', 'Projector', 'TV & Audio', 249.99); IF OBJECT_ID(N'dbo.ProductStaging', N'U') IS NOT NULL DROP TABLE dbo.ProductStaging; CREATE TABLE dbo.ProductStaging ( Code CHAR(8) NOT NULL, [Name] VARCHAR(50) NOT NULL, Category VARCHAR(50) NOT NULL, Price DECIMAL(6, 2) NOT NULL ); INSERT INTO dbo.ProductStaging (Code, [Name], Category, Price) VALUES ('CMP76460', 'Laptop', 'Computing', 479.99), ('CMP73900', 'Monitor', 'Computing', 209.99), ('CMP68194', 'PC', 'Computing', 749.99), ('APP16830', 'Washing Machine', 'Appliances', 519.99), ('APP14936', 'Refridgerator', 'Appliances', 349.99), ('APP19364', 'Cooker', 'Appliances', 689.99), ('TVA50385', 'Television', 'TV & Audio', 199.99), ('TVA50275', 'Projector', 'TV & Audio', 249.99);

SQL Tutorial - How to change data in a View

SQL Tutorial - Difference between CTEs and Derived Tables

Master SQL UPDATE Statement | SQL UPDATE A-Z Tutorial | SQL Update with JOIN

T-SQL Tutorial - Aggregate Window Functions Performance

SQL Indexes (Visually Explained) | Clustered vs Nonclustered | #SQL Course 35

SQL Tutorial - How to use NTILE in SQL Server

SQL Server Profiler in ONE Hour

Subquery in SQL | Correlated Subquery + Complete SQL Subqueries Tutorial
![SQL Course for Beginners [Full Course]](https://i.ytimg.com/vi/7S_tz1z_5bA/hq720.jpg?sqp=-oaymwEbCNAFEJQDSFryq4qpAw0IARUAAIhCGAG4AvcY&rs=AOn4CLCV4Cima1nx19tBObVX3l1NeRMD5g&usqp=CCc)
SQL Course for Beginners [Full Course]

T-SQL Tutorial - PIVOT without using PIVOT

Recursive SQL Queries Tutorial | Learn to write SQL Queries using Recursion

SQL Stored Procedures - What They Are, Best Practices, Security, and More...

SQL Tutorial - 21: The UPDATE Query

SQL Basics - Querying (learn how to write queries in 30 minutes)

SQL TUTORIAL - How to create a Stored Procedure

SQL Tutorial for Beginners with SQL Server | Full Course | 2024

SQL Tutorial - How to create a Dynamic Pivot in SQL Part 1

Learn Basic SQL in 15 Minutes | Business Intelligence For Beginners | SQL Tutorial For Beginners 1/3

SQL Tutorial - How to add total rows and columns to a Pivot Query

