MAC
MAC

Reputation: 6577

E mail id storing

how we can store the e mail id into a database? i mean which datatype is used for storing e mail id's.

Upvotes: 0

Views: 251

Answers (2)

Elzo Valugi
Elzo Valugi

Reputation: 27866

Type VARCHAR. I would also suggest that you encrypt the email addresses, using an algorithm and a secret salt key. Emails are sensitive information and is a good idea to store them encrypted so in case of data theft your clients wont find themselves on spam lists.

Upvotes: 0

Greg Hewgill
Greg Hewgill

Reputation: 993451

The natural choice would be a VARCHAR or the equivalent in your DBMS. There really isn't any reason to store an email address as anything other than a text string.

Upvotes: 4

Related Questions