SQL - Table Relationships
Given these tables:
What happens if you try to insert
CREATE TABLE Departments (DeptID INT PRIMARY KEY, DeptName VARCHAR(50));CREATE TABLE Employees (EmpID INT PRIMARY KEY, EmpName VARCHAR(50), DeptID INT, FOREIGN KEY (DeptID) REFERENCES Departments(DeptID));What happens if you try to insert
INSERT INTO Employees VALUES (1, 'Alice', 10); when there is no department with DeptID 10?