So I was trying to work this out but it seems that the last line (the check) doesn\'t allow sub queries in it. Any way to make this work Oracle?
CREATE TABLE
Justin's answer has some good ideas. Another one is to wrap all inserts/updates to the table with a package (a TAPI, if you will), and implement the checks there. You'll need to ensure that all applications use your TAPI. You'll also need to implement some custom locking to protect the constraint from the effects of concurrent activity.