Question: CREATE TABLE Vehicle ( ID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, Number INT UNSIGNED NOT NULL, Model VARCHAR(20) NOT NULL, Code INT UNSIGNED NOT
CREATE TABLE Vehicle ( ID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, Number INT UNSIGNED NOT NULL, Model VARCHAR(20) NOT NULL, Code INT UNSIGNED NOT NULL ); CREATE TABLE VehicleEvent ( ID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, VehicleID INT UNSIGNED NOT NULL, EventDate DATETIME NOT NULL, Description VARCHAR(255) NOT NULL, FOREIGN KEY (VehicleID) REFERENCES Vehicle(ID) );
Step by Step Solution
There are 3 Steps involved in it
Your question appears to include SQL commands for creating two tables Vehicle and VehicleEvent which are related through a foreign key Since there isn... View full answer
Get step-by-step solutions from verified subject matter experts
