Thursday, April 6, 2017

How to check whether string is alphanumeric or not in Oracle?

SELECT * FROM DUAL regexp_like('abc123','^[0-9a-zA-Z]+$') 

Output:
x


SELECT * FROM DUAL regexp_like('abc123@','^[0-9a-zA-Z]+$') 

Output:


abc123 is alphanumeric
abc123@  not alphanumeric

No comments:

Post a Comment