This is what I am trying to create:
CREATE TABLE VEHICLEREPORT 
(
    DeptID char(2)    not null,
    Vin#   char(3)    not null,         
    Miles  varchar(6) not null,
    Bill#  char(3)    not null,
    EID    char(3)    not null,
    PRIMARY KEY (DeptID, Vin#),
    FOREIGN KEY (bill#) REFERENCES billing,
    FOREIGN KEY (EID) REFERENCES Employee
);
The issue is with my reference to billing. The error says:
The number of columns in the referencing column list for foreign key 'FK__VEHICLERE__Bill#__5AEE82B9' does not match those of the primary key in the referenced table 'Billing'.
but my billing table entered fine:
CREATE TABLE BILLING 
(
    VIN#  char(3),      
    BILL# char(3),      
    PRIMARY KEY (VIN#, Bill#),
    FOREIGN KEY (VIN#) REFERENCES vehicle
);
What am i missing with this?
Appreciate the help.
 
     
     
    