ORA-24920,但文本短于列大小 [英] ORA-24920 but text is shorter than column size

查看:905
本文介绍了ORA-24920,但文本短于列大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个varchar2(16000 char)列,用于很长的文本.我可以在此列中插入超过4000个字符的文本,但是当我尝试通过sqldeveloper选择它时,出现ORA-24920错误.如果我从查询中跳过该列,则会得到一些数据,并且如果我检查列的长度,则会获得插入文本的正确长度.

I have a varchar2(16000 char) column, for really long texts. I can insert longer than 4000 char texts into this column, but when I try to select it through sqldeveloper I get an ORA-24920 error. If I skip that column from my query, I get some data back, and if I check the length of the column, I get back the correct length of the inserted text.

问题是sqldeveloper似乎无法处理此长文本.有什么主意吗?

The problem is that it seems that sqldeveloper cannot handle this long text. Any idea?

推荐答案

除非您使用的是Oracle 12c,否则SQL表在VARCHAR2上的限制为4000个字符.

Unless you're using Oracle 12c, SQL tables have a limit of 4000 characters on VARCHAR2.

这有点令人困惑,因为PL/SQL变量的VARCHAR2限制为32k,这意味着您可以在过程中声明VARCHAR2(16000)变量,并尝试将其插入到将在表中工作的表中.数据低于SQL限制.

This is a little confusing because PL/SQL variables have a VARCHAR2 limit of 32k, which means you could declare a VARCHAR2(16000) variable in a procedure and have it try to insert into a table which will work as long as the data is below the SQL limit.

在Oracle 12c中,如果

In Oracle 12c, the SQL table limit for VARCHAR2 can be expanded to 32k if MAX_STRING_SIZE property is set to EXTENDED.

如果数据库版本已经是12c,则需要将SQL Developer升级到最新版本,

If your database version is already 12c, then you need to upgrade your SQL Developer to the latest version, see here. Apparently older versions can't handle the expanded SQL VARCHAR2 limit and will give you the error you're seeing.

这篇关于ORA-24920,但文本短于列大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆