I have 2 tables employee_master & user_master
Employee_id is a foreign key in user_master.
I need to encrypt the value of Employee_id while the value is being inserted into user_master table.
but the foreign key relationship should be kept… How can we do that
I know you can’t as if you will get an error.
The foreign key should have same value and type to its referenced field.
I’m not pretty sure with this, as an alternative you can refer to Bhushan post. Another is, make the foreign key as a normal field and let the query handle if the field is related to referenced field. But of course foreign key has other uses which a normal field doesn’t have.