Why is long an issue with Oracle?

对着背影说爱祢 提交于 2019-12-02 04:20:26

问题


Why is long an issue with Oracle?

It will be better if some one can tell me what are the issues with using the long data type in oracle? something related to storage?

I was asked this in an interview.


回答1:


LONG is archaic and deprecated, and has been superseded by CLOB. There are lots of restrictions with LONGs and they are difficult to manipulate in SQL. So while you may have to deal with them in old databases, you would be unwise to ever use a LONG column in a new table.




回答2:


Unfortunately, LONGs are still sometimes necessary. For example, you can read a LONG from a remote database, but you can't read a CLOB from a remote database until 12.2. (Although you can always write a CLOB to a remote database.) I'm guessing this is why they are still used everywhere in the data dictionary.

Other than that issue, you should probably always use CLOBs.



来源:https://stackoverflow.com/questions/3386172/why-is-long-an-issue-with-oracle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!