从这两个线程中,
LONG 已经过时且已弃用。 Oracle 说,
不要创建包含 LONG 列的表。请改用 LOB 列(CLOB、NCLOB)。支持 LONG 列只是为了向后兼容。
Oracle 还建议您将现有的 LONG 列转换为 LOB 列。 LOB 列受到的限制比 LONG 列少得多。此外,LOB 功能在每个版本中都得到增强,而 LONG 功能在多个版本中都是静态的。
但是,如果没有此处提到的解决方法。
我应该选择哪一个来在表格中存储一些文本?或者是否有比这两个更好的解决方案?
From these two threads,
LONG is archaic and deprecated. Oracle says,
Do not create tables with LONG columns. Use LOB columns (CLOB, NCLOB) instead. LONG columns are supported only for backward compatibility.
Oracle also recommends that you convert existing LONG columns to LOB columns. LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB functionality is enhanced in every release, whereas LONG functionality has been static for several releases.
But you cannot read a CLOB from a remote database without the workarounds mentioned here.
Which one should I prefer to store some text in my tables? Or is there a better solution than these two?
发布评论
评论(2)
使用 CLOB。 LONG 的局限性之一是无法从 SQL - PL/SQL 正确处理 LONG。
有关差异的更详细说明,请参阅 http ://www.comp.dit.ie/btierney/oracle11gdoc/appdev.111/b28393/adlob_tables.htm#insertedID2
Use CLOBs. One limitation of LONG is that LONGs can't be handled correctly from SQL - PL/SQL.
For a more detailed description of the differences, see http://www.comp.dit.ie/btierney/oracle11gdoc/appdev.111/b28393/adlob_tables.htm#insertedID2
如果 Oracle 表示某个功能已弃用,则该功能在未来版本中可能不再可用。因此,除非您的应用程序将在当前 Oracle 版本上无限期地运行,否则请勿使用已弃用的功能。
If Oracle says a feature is deprecated it may not be available any longer in a future release. So unless your application will run on the current Oracle version for an unlimited amount of time, don't use deprecated functionality.