Hi, On one of my databases I'm trying to create a constraint check for to check that a string has two digits followed by two characters, Could anyone provide me with an example of how I could go about doing this? So far I've tried the following but neither work: CONSTRAINT chk_id CHECK (id LIKE '[0-9][a-zA-Z][a-zA-Z]') CONSTRAINT chk_id CHECK (id LIKE '[0-9][a-z,A-Z][a-z,A-Z]') Code (markup):
After a long time searching I found the answer so here it is for future reference: CONSTRAINT chk_id CHECK ( REGEXP_LIKE ( id, '[0-9][a-zA-Z][a-zA-Z]') ) Code (markup):