Home Email address columns in SQL Server
Reply: 0

Email address columns in SQL Server

user553
1#
user553 Published in June 23, 2018, 9:20 pm

What's the correct way to add a check constraint for columns that should only contain email addresses?

We've had buggy software in the past that's added garbage to email columns and I would like to prevent that from happening again.


Please note that "perfect" solutions are not expected. While full RFC compliance would be great, I think most of us can agree just catching obvious mistakes such as "domain/username" and "2017-12-3" would be enough.

And of course it cannot reject any valid email address.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.326063 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO