Home > Database > Mysql Tutorial > ORA-06502错误的反省

ORA-06502错误的反省

WBOY
Release: 2016-06-07 17:09:34
Original
1634 people have browsed it

ORA-06502: PL/SQL: 数字或值错误 : 字符串缓冲区太小

ORA-06502: PL/SQL: 数字或值错误 : 字符串缓冲区太小

一般情况对数据库查询的时候我们会用拼接一个where语句的方式来查询,不过有一种情况我们不太确定where语句的内容(比如说,它需要在运行时确定,,也就是在执行是拼接一个sql语句  XXXID in (IDa,IDb,IDc,...))。

这个错误出现前,我的做法是就是这样的。出现问题的原因是,随着数据量的增大,in后面的数据会非常多,从而造成sql语句过长。

解决办法为:我把in后面的东西拼接成一个sql语句(select ID distinct from table1where...).

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template