How to validate email addresses in mysql?
Answer / Kamal Kumar Maurya
To validate email addresses in MySQL, you can use a regular expression:
```sql
CREATE TABLE emails (
id INT AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(255) CHECK (email REGEXP '^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$')
);
```
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the default password for mysql?
Is mysqli secure?
What is ISAM?
What is the difference between a heap table and temporary table?
What are the differences between char and varchar?
In which language mysql has been written?
In which year mysql created?
What is longblob in mysql?
How do you backup a database in mysql?
How can you find out the version of the installed mysql?
Difference between CHAR and VARCHAR?
Why MySQL is used?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)