All Forums General
rakeshsapbo 36 posts Joined 04/13
09 Sep 2014
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.

Rakesh Reddy G
09 Sep 2014

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

Raja_KT 1246 posts Joined 07/09
09 Sep 2014

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

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

Priya01 10 posts Joined 08/14
09 Sep 2014

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

rakeshsapbo 36 posts Joined 04/13
10 Sep 2014

Thanks every one for your inputs.
really helpful.

Rakesh Reddy G

You must sign in to leave a comment.