SQL Practice Questions - Day13
@LearnWithRD0529 Create table and insert scripts - -------------------------------------------------- CREATE TABLE vehicle ( vehicle_id INT PRIMARY KEY, make VARCHAR(50), model VARCHAR(50), year INT, color VARCHAR(20), vin_number VARCHAR(17) UNIQUE ); -- Insert 11 sample vehicle records INSERT INTO vehicle (vehicle_id, make, model, year, color, vin_number) VALUES (1, 'Toyota', 'Camry', 2020, 'Silver', '1HGCM82633A123456'); INSERT INTO vehicle (vehicle_id, make, model, year, color, vin_number) VALUES(2, 'Honda', 'Civic', 2019, 'Blue', '2HGFC2F53KH123457'); INSERT INTO vehicle (vehicle_id, make, model, year, color, vin_number) VALUES(3, 'Ford', 'F-150', 2021, 'Red', '1FTMF1EP0MFA12345'); INSERT INTO vehicle (vehicle_id, make, model, year, color, vin_number) VALUES(4, 'Chevrolet', 'Malibu', 2018, 'Black', '1G1ZD5ST0JF123456'); INSERT INTO vehicle (vehicle_id, make, model, year, color, vin_number) VALUES(5, 'Nissan', 'Altima', 2020, 'White', '1N4BL4CV0LC123456'); INSERT INTO vehicle (vehicle_id, make, model, year, color, vin_number) VALUES(6, 'Jeep', 'Wrangler', 2017, 'Green', '1C4HJXFG2JW123456'); INSERT INTO vehicle (vehicle_id, make, model, year, color, vin_number) VALUES(7, 'Toyota', 'Corolla', 2022, 'Silver', '5YFEPRAEXNP123456'); INSERT INTO vehicle (vehicle_id, make, model, year, color, vin_number) VALUES(8, 'Subaru', 'Outback', 2019, 'Gray', '4S4BSANC2K3A12345'); INSERT INTO vehicle (vehicle_id, make, model, year, color, vin_number) VALUES(9, 'BMW', 'X5', 2020, 'Black', '5UXCR6C00L9B12345'); INSERT INTO vehicle (vehicle_id, make, model, year, color, vin_number) VALUES(10, 'Audi', 'A4', 2021, 'Blue', 'WAUAFAFL4JA123456'); INSERT INTO vehicle (vehicle_id, make, model, year, color, vin_number) VALUES(11, 'Hyundai', 'Elantra', 2018, 'Red', '5NPD84LF0JH123456');
Download
1 formatsVideo Formats
Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.