Reputation: 6577
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
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
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