Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE:

RE:

From: Naveen Nahata <naveen_nahata_at_mindtree.com>
Date: Wed, 28 Aug 2002 05:13:22 -0800
Message-ID: <F001.004C13ED.20020828051322@fatcity.com>


First things first. NEVER use a LONG datatype. Oracle says so too but alas uses it in a lot of data dictionary tables. Long has many limitations.

The data in VARCHAR2 and CLOBs is stored according to the charcter set defined at the time of database creation. The data in NCLOBs is stored according to the NLS_CHARACTER_SET. Starting 9i the default is UNICODE.

What do you mean by 50 lines? How much character is one line? If the maximum text length is not going to exceed 4000 bytes then you should use varchar2, because it accomodates the text and is very easy to use.

If the text cannot be accomodated in a varchar2 field then you have to use a CLOB, in which case depending upon the type of data you can choose either CLOB or NCLOB.

The problem(or good thing, depending on the situation) with VARCHAR2 fields is that the data is stored alongwith the other data. So it may lead to fragmentation. Alternatively it takes only one read to read the varchar2 data alongwith the other data of the row so it can be benefecial too. depends on how much update against that column you are going to make.

HTH
Naveen

-----Original Message-----
Sent: Wednesday, August 28, 2002 5:49 PM To: Multiple recipients of list ORACLE-L Subject:

Hi,

I would like to know which datatype is best to use for storing text data of around 50 lines.The data is basically a variable length user feedback.I am in confusion whether to go for VARCHAR2 or LONG type. Also in CLOB and NCLOB, can somebody clarify me about "CLOBS store single-byte character set data and NCLOBs store fixed-width and varying-width multibyte national chararcter set data(NCHAR data)". Which one is the best to use among VARCHAR2,LONG,CLOB,NCLOB for my requirement

Thanks & Regards,
Sankar  

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: P.V.Sankar
  INET: sankar_at_cdotb.ernet.in

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Naveen Nahata
  INET: naveen_nahata_at_mindtree.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Aug 28 2002 - 08:13:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US