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.
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.
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
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).
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.