SQL - Table Relationships
Given these tables:
What happens if you try to insert
CREATE TABLE Authors (AuthorID INT PRIMARY KEY, Name VARCHAR(50));CREATE TABLE Books (BookID INT PRIMARY KEY, Title VARCHAR(100), AuthorID INT, FOREIGN KEY (AuthorID) REFERENCES Authors(AuthorID));What happens if you try to insert
INSERT INTO Books (BookID, Title, AuthorID) VALUES (1, 'My Book', 99); when there is no author with AuthorID = 99 in Authors?