hello guyz, i need your advice with this one.... tblRegistry (Registry_Key int, Parent_key int, Data varchar) tblSubscribers(Account_No int, Account_Name, Registry_Key) sample data: tblregistry Registry_Key Parent_Key Data 1 1 Main Registry 2 1 Collectors 3 2 Will Smith 4 2 John Smith tblsubscribers Account_No Account_Name Registry_Key 1 Sample Name 3 2 New Name 4 my problem is i want to check the integrity of the database so that it registry_key from tblsubscribers will relate to registry_key from tblregistry (where tblregistry having parent_key=2) i tried this one with check constraints registry_key in (select registry_Key from tblregistry where parent_key = 2) BUT IT DOESNT WORK. is there a way to solve this problem with sql.
TCC