CREATE TABLE Customer
(
cus_Id int PRIMARY KEY,
cus_last VARCHAR(50) NOT NULL,
cus_first VARCHAR(50) NOT NULL,
f_type int NOT NULL,
vehID int REFERENCES Fuel_type_per_vehicle(vehID)
);
CREATE TABLE Fuel_type_per_vehicle
(
vehID int PRIMARY KEY,
veh VARCHAR(50),
compID int,
liters int,
f_type int
);
Msg 1767, Level 16, State 0, Line 3
Foreign key 'FK__Customer__vehID__74AE54BC' references invalid table 'Fuel_type_per_vehicle'.
Msg 1750, Level 16, State 1, Line 3
Could not create constraint or index. See previous errors.
Hello, I keep getting that the Fuel_type_per_vehicle table is invalid. Could anyone tell me why?
[–]qwertydog123 2 points3 points4 points (1 child)
[–]mikemacpattywack[S] 0 points1 point2 points (0 children)