Home > Mobile >  Oracle SQL Query to find e-mail addresses starting with numbers
Oracle SQL Query to find e-mail addresses starting with numbers

Time:09-17

Select * from Table_name where Column_name like '1%@%'

returns me all email addresses starting with '1'.What I want is to get mail IDs that has username with all and any numbers. Like '[email protected]' or '[email protected]'.Is there any operator like % that refers not just any characters but numbers only?

CodePudding user response:

We can use REGEXP_LIKE here:

SELECT *
FROM yourTable
WHERE REGEXP_LIKE(email, '^[0-9] @');
  • Related