DATA TYPE FOR EMAIL ADDRESS

General
Enthusiast

DATA TYPE FOR EMAIL ADDRESS

Hi,

what will be the data type used for email address innthe table creation

CREATE TABLE DBC.TABLE

(

C_ID CHAR(10) NOT NULL,

CNAME VARCHAR(30),

JDATE DATE FORMAT 'DD-MMM-YY',

LOCATION VARCHAR(30),

AREA_CD CHAR(3),

COUNTY_CD INTEGER,

PHONE INTEGER,

COUNTRY CHAR(10),

EMAIL VARCHAR(30),

SALARY DECIMAL(10,2)

);

data insert

INSERT INTO COMPANY.SOFTWARES VALUES ('ABC0HYD','ABC','26-NOV-09','HYDERABAD','040,'91','123456789',"SAMPLE@XYZ.com",'750000')

are the above data types correct???

Can you please provide one sample record.

4 REPLIES
Enthusiast

Re: DATA TYPE FOR EMAIL ADDRESS

i think varchar should be fine for email address...

Enthusiast

Re: DATA TYPE FOR EMAIL ADDRESS

You can make varchar. But see the precision is high enough to accomodate long email addresses :).

Enthusiast

Re: DATA TYPE FOR EMAIL ADDRESS

Here is one sample record

INSERT INTO <table_name> VALUES ('ABC0HYD','ABC','2009-11-26','HYDERABAD','040',91,123456789,'IND','SAMPLE@XYZ.com',750000);

Enthusiast

Re: DATA TYPE FOR EMAIL ADDRESS

Thanks every one for your inputs.

really helpful.