views:

855

answers:

4

Does Oracle have an equivalent column type to MySQL's TEXT type?

If not, how are larger blobs of text typically stored? BLOB, varchar(32767)? It's Oracle 10 being accessed via PHP, if it matters. Historical context is more than welcome.

+2  A: 

I think you probably want the CLOB datatype.

DCookie
+3  A: 

Oracle has BLOB, CLOB and NCLOB for storing binary, character and unicode character data types. You can also specify the LOB storage area which allows a DBA to fine tune the storage if necessary (i.e. putting the LOB data on separate disks)

This page gives a bit more info: http://www.dba-oracle.com/t_blob.htm

Marc
The official docs: http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#i3237
David Aldridge
+1  A: 

The Character Large Object (CLOB) is likely what you are looking for. However, if you know that all of the text will fit in a VARCHAR2 then definitely put it there. A clob cannot be used in a group by clause and is much slower to use than a varchar2 in most cases. If you know that you will exceed the 4000 byte limit, then use the CLOB (which can handle up to 4gb).

jle
A: 

Oracle SQL has a limit of 4000 characters for a VARCHAR2 column (Oracle PL/SQL has a higher limit of 32,767 characters). As stated by the others, CLOB is suitable for storing large quantities of text.

Jeffrey Kemp