Varun Gaur
asked on
My question from foreign key ?
If I try to add a Foreign key column in existing other tables then A error is burned.
Msg 1769, Level 16, State 1, Line 62
Foreign key 'Cstaddress_id' references invalid column 'Cstaddress_id' in referencing table 'customer'.
Msg 1750, Level 16, State 0, Line 62
Could not create constraint or index. See previous errors.
So please give me the solution of this error.
Msg 1769, Level 16, State 1, Line 62
Foreign key 'Cstaddress_id' references invalid column 'Cstaddress_id' in referencing table 'customer'.
Msg 1750, Level 16, State 0, Line 62
Could not create constraint or index. See previous errors.
So please give me the solution of this error.
Besides providing us with the table schemas, you should also provide us the command that you're trying to run to create the FK.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is there a primary key (not likely) or a unique key defined on column cstaddress_id on table customer?
Is the datatype of column cstaddress_id in both the tables is identical?
Please review and revert. Share more details if error continues...