vencinachev

CarsDB

Dec 21st, 2020
747
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE DATABASE AutoUKTC;
  2.  
  3. USE autouktc;
  4.  
  5. CREATE TABLE cars (
  6. CarID INT AUTO_INCREMENT PRIMARY KEY,
  7. Make VARCHAR(100),
  8. Description VARCHAR(500),
  9. ImageLink VARCHAR(300),
  10. Milage INT
  11. );
  12.  
  13.  
  14. INSERT INTO cars
  15. VALUES (1, 'Opel Astra', 'Super car', 'https://images.ams.bg/images/galleries/109624/opel-astra-1460796459_big.jpg', 160054);
  16.  
  17. INSERT INTO cars (Make, Description, ImageLink, Milage)
  18. VALUES ('Mercedes C220', 'German car', 'https://media.autoexpress.co.uk/image/private/s--ctJBoyrv--/v1579703511/autoexpress/2018/09/1_.jpg', 95630);
  19.  
  20. DELETE FROM cars WHERE CarID = 1;
  21.  
  22. SELECT * FROM cars;
  23.  
RAW Paste Data