php Oracle 相当于 MySQL 的 TEXT 类型
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1180204/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle Equivalent of MySQL's TEXT type
提问by Alan Storm
Does Oracle have an equivalent column type to MySQL's TEXTtype?
Oracle 是否具有与 MySQLTEXT类型等效的列类型?
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.
如果不是,通常如何存储较大的文本块?BLOB, varchar(32767)? 如果重要的话,它是通过 PHP 访问的 Oracle 10。历史背景非常受欢迎。
采纳答案by MarcE
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)
Oracle 有 BLOB、CLOB 和 NCLOB 用于存储二进制、字符和 unicode 字符数据类型。您还可以指定 LOB 存储区域,允许 DBA 在必要时微调存储(即将 LOB 数据放在单独的磁盘上)
This page gives a bit more info: http://www.dba-oracle.com/t_blob.htm
此页面提供了更多信息:http: //www.dba-oracle.com/t_blob.htm
回答by jle
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).
字符大对象 (CLOB) 可能正是您要找的。但是,如果您知道所有文本都适合放在 VARCHAR2 中,那么一定要把它放在那里。clob 不能在 group by 子句中使用,并且在大多数情况下比 varchar2 使用要慢得多。如果您知道将超过 4000 字节的限制,则使用 CLOB(最多可以处理 4GB)。
回答by Jeffrey Kemp
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.
Oracle SQL 的 VARCHAR2 列限制为 4000 个字符(Oracle PL/SQL 的上限为 32,767 个字符)。正如其他人所说,CLOB 适合存储大量文本。
回答by Dulith De Costa
You need to use CLOB. It stands for Character Large Object.
您需要使用CLOB. 它代表字符大对象。
A CLOB is used to store unicode character-based data, such as large documents in any character set.
CLOB 用于存储基于 Unicode 字符的数据,例如任何字符集中的大型文档。
It`s value can be up to 2,147,483,647characters long.
它的值最长可达2,147,483,647 个字符。

