Question: what's wrong with this code, the error message im getting is: Msg 2716, Level 16, State 1, Line 1 Column, parameter, or variable #4: Cannot

 what's wrong with this code, the error message im getting is: Msg 2716, Level 16, State 1, Line 1 Column, parameter, or variable #4: Cannot specify a column width on data type int.

CREATE TABLE Car( Id VARCHAR(10) PRIMARY KEY, Model_id VARCHAR(10), Color VARCHAR(45), Year INT(4), Mileage DECIMAL(4,2), Horse_power INT(10), Price DECIMAL(12,2), DriveTrain_id VARCHAR(10), Color_id VARCHAR(10), FOREIGN KEY (Model_id) REFERENCES Model(Id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (DriveTrain_id) REFERENCES Drivetrain(Id) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (Color_id) REFERENCES Color(Id) ON UPDATE CASCADE ON DELETE CASCADE

);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The issue in your code is with the data type definition for ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!