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: LONG or VARCHAR2(2000)

Re: LONG or VARCHAR2(2000)

From: dale young <dale.young_at_kwe.com>
Date: Wed, 10 May 2000 10:18:04 -0500
Message-Id: <10493.105338@fatcity.com>


Longs are a PAIN to deal with. You can use substr, you can't format them very well, many tools don't know how to deal with them, you can't use them in Oracle's replication, probably other restrictions that I'm forgetting. Some of Oracle8's newer data types (LOBs, CLOBs, BLOBs, etc.) remove some of these restrictions, but not all

The only problem I've seen with Varchar2(2000) is with some older tools that don't support them; this shouldn't be an issue if you have support (as you can upgrade) but if you're stuck with an older tool for some reason, you might want to check how it handles varchar2(2000) columns before proceeding.

If your data is going to be larger than 2000 bytes, I'd look at the appropriate xLOB. Otherwise I'd use Varchar2(2000) in most cases. YMMV.

*Dale*

Eric Fang wrote:

> we decide to use a field to store the URL in the
> database, it could be very long but most of them less
> that 2k characters. But some developers prefer to use
> VARCHAR2(2000). What's the advantage of using LONG v.s
> VARCHAR2(2000) or VARCHAR@(2000) v.s LONG?
>
> Any opinion?
> Thanks.
>
> Eric Fang
>
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/
> --
> Author: Eric Fang
> INET: eric_fang_at_yahoo.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 May 10 2000 - 10:18:04 CDT

Original text of this message

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