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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Memo Fields

Re: Memo Fields

From: Hans Forbrich <hforbric_at_yahoo.net>
Date: Thu, 15 Jan 2004 02:52:32 GMT
Message-ID: <4005FFD6.4BF307AA@yahoo.net>

Daniel Morgan wrote:
>
> Hans Forbrich wrote:
>
> > Daniel Morgan wrote:
> >
> >>Frank van Bortel wrote:
> >>
> >>
> >>>Daniel Morgan wrote:
> >>>
> >>>
> >>>>Michael Hill wrote:
> >>>>
> >>>>
> >>>>>I had a guy ask me about Memo Fields in Oracle.
> >>>>>
> >>>>>Remember Memo fields are the text files stored outside a Microsoft
> >>>>>Access DB when the user creates a memo field in their DB.
> >>>>>
> >>>>>The question was: "Does Oracle have Memo Field".
> >>>>>The answer I gave was that Oracle had a character field that goes up to
> >>>>>2000 charcters nad then everything else could be stored in a blob.
> >>>>>
> >>>>>Did I tell him correctly?
> >>>>>
> >>>>>Mike
> >>>>>
> >>>>
> >>>>Strictly speakig no because Oracle would never limit itself to a
> >>>>brain-dead architecture like MS Access.
> >>>>
> >>>>You don't mention version but for years now VARCHAR2 fields have held
> >>>>4000 bytes (not characters Mike) and CLOB fields will hold up to 4 GB.
> >>>>
> >>>>Either of these can be used to hold text information and either will
> >>>>greatly outperform MS Access capabilities.
> >>>>
> >>>
> >>> And asof 9iR2 4000 Characters. UTF and all.
> >>
> >>4000 characters even if they characters are 3 bytes each? Are you sure?
> >
> >
> > Oracle has been very careful to discriminate betwwen 'character' and
> > 'byte' in their docco. From the SQL Reference manual for 9iR2, datatype
> > 'VARCHAR2' is 4000 bytes, datatype 'NVARCHAR2' is 4000 [unicode]
> > characters and that means 'up to 16,000 bytes'.
>
> That's what I thought. I didn't think you could get more than 4K bytes
> into a VARCHAR2.
>

CORRECTION: NVARCHAR2 is limited to 4000 BYTES. (Sorry)

A few followup points, from
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/sql_elements2a.htm#45504 and other areas around the SQL Reference manual:

NCHAR, NVARCHAR2 use 'character' sizing and are apparently designed to go with unicode.

CHAR, VARCHAR2 can have their size qualified "(VARCHAR2(20) CHAR" or "(VARCHAR2(20) BYTE" but both are limited to 4000 bytes.

From what I can see, most of the 'character' functions (LTRIM, etc.) use 'character' rather than 'byte' semantics. Some have byte and char versions (SUBSTR vs SUBSTRC vs SUBSTRB, LENGTH vs LENGTHB ...). Received on Wed Jan 14 2004 - 20:52:32 CST

Original text of this message

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