Cars.sql 1.1 KB

1234567891011121314151617181920212223242526
  1. use [Sergeichev]
  2. create table Cars
  3. (
  4. Code_Car int primary key identity(1,1) not null,
  5. Code_Brand int foreign key references Car_Brands(Code_Brand) not null,
  6. Code_Model int foreign key references Car_Models(Code_Model) not null,
  7. Code_Body int foreign key references Car_Body(Code_Body) not null,
  8. Code_Color int foreign key references Car_Colors(Code_Color) not null,
  9. Code_TransmissionType int foreign key references Car_TransmissionType(Code_TransmissionType) not null,
  10. Code_DriveType int foreign key references Car_DriveTypes(Code_DriveType) not null,
  11. Code_SteeringWheel int foreign key references Car_SteeringWheel(Code_SteeringWheel) not null,
  12. Volume_Engine varchar(5) not null,
  13. Power_Engine varchar(5) not null,
  14. Code_EngineType int foreign key references Car_EngineTypes(Code_EngineType),
  15. Release_Date date not null,
  16. Mileage int not null,
  17. Owners int not null,
  18. Code_Condition int foreign key references Car_Condition(Code_Condition),
  19. VIN nvarchar(17) not null,
  20. Date_Sell date not null,
  21. Price_Sell int not null,
  22. Photo varbinary(MAX),
  23. Car_Description nvarchar(200)
  24. )