Answer Posted / 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 |
Post New Answer View All Answers