Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Regexp_like with check constraint

user533671May 13 2013 — edited May 14 2013
Hi all,

My requirement is User should not enter the data like ( ½, ¼,...).
I have created table with check constraint with the following syntax:


CREATE TABLE mytest (c1 VARCHAR2(20),
CHECK (REGEXP_LIKE(c1,'^[[:alnum:]+[:digit:]+[!@#]]+$')));

The above means, except alphanumeric, digits, and keyboard characters should allow. But it is not allowing any characters.

Please help me, any mistake in the above syntax.

Thanks
Mano
This post has been answered by Solomon Yakobson on May 13 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2013
Added on May 13 2013
6 comments
7,844 views