Query for Constraints
I have Table with Two columns
First Time No check on insertion:
user has entered record:
Next time User inserts with same SID must have owner as avi.
1 avi is right entry( This entry can be multiple)
1 Julian is wrong entry
is there any check or constraint in oracle for these types of checks
You need to write trigger for such kind of requirement... which will check if the new entry is already in the table.. If not then raised an exception ...
I feel you need to work on your table structure.. Why don't you refer to Parent/Child (Foreign key) relationship. Where before inserting a child recond, you need to insert a record into Parent table which will be then refered into Child table.. having a possibility of multiple child records with same Parent Id.
Click Here to Expand Forum to Full Width