SQL - Table Relationships
You have two tables:
If a product is deleted from Products, what happens to the related ProductID in Sales?
CREATE TABLE Products (ProductID INT PRIMARY KEY, Name VARCHAR(50));CREATE TABLE Sales (SaleID INT PRIMARY KEY, ProductID INT, FOREIGN KEY (ProductID) REFERENCES Products(ProductID) ON DELETE SET NULL);If a product is deleted from Products, what happens to the related ProductID in Sales?
