Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. create table cars(
  2. symboling int check(symboling between -4 and 3),
  3. normalized_losses int check(normalized_losses between 65 and 256),
  4. brand nvarchar check(brand in ('alfa-romero', 'audi', 'bmw', 'chevrolet', 'dodge', 'honda',
  5. 'isuzu', 'jaguar', 'mazda', 'mercedes-benz', 'mercury',
  6. 'mitsubishi', 'nissan', 'peugot', 'plymouth', 'porsche',
  7. 'renault', 'saab', 'subaru', 'toyota', 'volkswagen', 'volvo')),
  8. fuel nvarchar check(fuel in('diesel','gas')),
  9. aspiration nvarchar check(aspiration in ('std','turbo')),
  10. doors nvarchar check(doors in ('four','two')),
  11. body_style nvarchar check(body_style in ('hardtop', 'wagon', 'sedan', 'hatchback', 'convertible')),
  12. drive_wheels nvarchar check(drive_wheels in ('4wd','fwd','rwd')),
  13. engine_location nvarchar check(engine_location in ('front','rear')),
  14. wheel_base float check(wheel_base between 86.6 and 120.9),
  15. length float check(length between 141.1 and 208.1),
  16. width float check(width between 60.3 and 72.3),
  17. height float check(height between 47.8 and 59.8),
  18. curb_weight float check(curb_weight between 1488 and 4066),
  19. engine_type nvarchar check(engine_type in ('dohc', 'dohcv', 'l', 'ohc', 'ohcf', 'ohcv', 'rotor')),
  20. num_of_cylinders nvarchar check(num_of_cylinders in ('eight', 'five', 'four', 'six', 'three', 'twelve', 'two')),
  21. engine_size int check(engine_size between 61 and 326),
  22. fuel_system nvarchar check(fuel_system in('1bbl', '2bbl', '4bbl', 'idi', 'mfi', 'mpfi', 'spdi', 'spfi')),
  23. bore float check(bore between 2.54 and 3.94),
  24. stroke float check(stroke between 2.07 and 4.17),
  25. compression_ratio int check(compression_ratio between 7 and 23),
  26. horsepower int check(horsepower between 48 and 288),
  27. peak_rpm int check(peak_rpm between 4150 and 6600),
  28. city_mpg int check(city_mpg between 13 and 49),
  29. highway_mpg int check(highway_mpg between 16 and 54),
  30. price int check(price between 5118 and 45400),
  31. id int primary key identity(1,1)
  32.  
  33. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement