Tag Info

New answers tagged


A foreign key can not be "conditional". The only "exception" to that rule are null values which can't reference another table by definition. If I understand your question correctly, you are trying to implement a constraint that says "if refunded is true then refund_id must reference an existing transaction". I don't think you need the refunded column at ...


It's your regexp_like expression that is invalid. You're using your column as if it was a function name. The syntax is: regexp_like(thing_to_check, pattern [, options]) You should write: regexp_like(species_imagefile, '[A-Z0-9._%-]+.JPG', 'i') 'i' is for case-insensitive matching.


Try something like CREATE TABLE test_stmp(StartDate TIMESTAMP NOT NULL, constraint chk_test_filed check(trunc(StartDate) = to_date('2000-01-01','yyyy-mm-dd')));

Top 50 recent answers are included