I have two tables called Product and Category
- Code: Select all
Product
product_id pk
Product_No
Product_Desc
- Code: Select all
Category
category_id pk
product_id fk to product_id of product table
category_code
rate
I am writing data to both these tables from front end.
I would like to have a condition that if Product_No from Product table and category_code from Category table should be unique,i.e.
if user trying to enter same Product_No and category_code, then there should be some kind of validation to prevent this.
What is the best mechanism to achieve this in database.
My version 10g on Solaris
Regards