This site uses cookies. By continuing, your consent is assumed. Learn more

145.9fm shares

Validating email address using regular expression in sql

opinion

In my previous article, I have given the basic idea of regular expressions and its different functions.

The main question is how these regular expressions work in real life scenarios. Email validation in SQL can be achieved with multiple ways.

The best way is using the regular expressions user can validate the email. You can achieve the Email validation in SQL server also.

I need to write a...

So this article not only gives the idea about Email validation in oracle it will give the details about Email validation in SQL Server also. Before that user needs to write function and then it needs to use in procedure or select statement.

The above function code is written for validating the email in Oracle.

5 solutions

After writing this function check the function or test the function using simple select statement and use function in it. This is the simplest way of validating the email. If user is using the Oracle 11G and higher version of oracle then use simple regular expression function to validate the email address.

There are some specific rules to validate the email in oracle.

RegExValidate(emailaddress, @regex) AS validemail FROM...

The first part of email id is always the alphabet. So user needs to check whether it starts with alphabet. The second part of email id is checking of at the rate symbol.

News feed