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