Reputation: 5
I'm a beginner on oracle apex and im trying to implement a constraint that only allows variables in a column that start with a certain letter ('P') and are followed by numeric digits. Any help?
Upvotes: 0
Views: 1116
Reputation: 311228
You could use the regexp_like
operator:
ALTER TABLE mytable
ADD CONSTRAINT mytable_field_check
CHECK (REGEXP_LIKE (myfiled, 'P[0-9]*'))
Upvotes: 1