I have two tables one is tblWork and other is tblJobs
tblWork contain fields (Parent Table)
WorkID int Primary Key
WorkCode varchar(32)
WorkDetails varchar(32)
tblJob contain Fields (Child Table)
JobID int Primary key
Workcode varchar(32)
JobDescription varchar(128)
how to give Foreign key to Workcode instead of WorkID when i added WorkId in tblJob foreign key is working but i need foregin key
to Workcode for other tables consistence my project depends upon this workcode
Error code:
PrimaryKey Table ForeignKey Table
tblWork tblJobs
Workcode workcode
Error look like the column in table 'tblWork' do not match an existing Primary key or Unique key
please send me the solution
Thanku