当前位置:网站首页>The maximum expression in Oracle database message list is 1000 error
The maximum expression in Oracle database message list is 1000 error
2022-06-30 07:07:00 【Peppermint brain flower】
oracle The maximum expression in the database message list is 1000 error
1. explain :
This error refers to sql in in The maximum number of parameters in cannot exceed 1000 individual , This is a oracle The database is set like this .
2. Background reproduction :
When developing in a formal environment , Because the amount of data will be very large , Will meet in() The parameters in parentheses have exceeded 1000 Circumstances , In this case , The error will be reported again , The screenshot is as follows :
3. Solutions :
From the above, we can find that , as long as in The parameters of are guaranteed in 1000 within , Then the error message will not appear . therefore , The core idea for us to solve this problem is to avoid in The parameter of exceeds 1000.
4. Solution :
I have two solutions :
1. If the background is used sql Splicing method : Can be in in When , Write another if Judge , When you want In Parameters of index The numerical value is taken as 999 The mold for 0, I'll do it again in( Put the data behind )
2. If you are using xml The document says sql, be used sql Dynamic Tags , The idea is the same as the plan , I am far from showing the code writing of scheme 2 :
select name,sex,age from man where id in
<foreach collection="idList" index="index" open="(" close=")" separator="," item="id">
<!-- Prevent data from exceeding 1000 Report errors -->
<if test="(index % 999) == 998">
0 )
or id in (
</if>
#{id}
</foreach>
The final general appearance is like this :
select name,sex,age from man where id in (1,2,3) or id in (4,5,6) or id in (7,8,9)...
5. Conclusion :
Error reporting through this , We will find that , yes , we have bug It's invisible , In this data environment , There's nothing wrong with your code , But a different data environment , There will be problems , When developing later , Think as much as possible if the current amount of data becomes larger , Will there be any problems , How to avoid this problem ; Finally, I hope my article can help you .
边栏推荐
- [transfer] analysis of memory structure, cache and DMA architecture
- Ls1028 manual
- [semidrive source code analysis] [x9 chip startup process] 33 - Analysis of related concepts of display module
- Write and run the first go language program
- Xshell传输文件
- Realization of dissolve effect in unity and its principle analysis
- 【已解决】MySQL异常:ERROR 1045 (28000): Unknown error 1045,忘记初始密码
- 0 basic job transfer software test, how to achieve a monthly salary of 9.5k+
- Finished product upgrade procedure
- 【申博攻略】五.专家推荐信模板
猜你喜欢
随机推荐
vs2019和sql
Install go language development tools
年轻人搞副业有多疯狂:月薪3000,副业收入3W
Ftplib+ tqdm upload and download progress bar
[datawhale team learning] task02: mathematical operation, string and text, list
神经网络计算量及参数量
【已实现】服务器jar包启动脚本、shell脚本
leetcode:98. 验证二叉搜索树
2021-07-02
Browser downloads files as attachments
Introduction to go project directory structure
Finished product upgrade procedure
ROS program compilation, like no compilation, refers to the execution of the old compiled executable program
Traverse map
What if I don't know what to do after graduating from university?
【docsify基本使用】
SQL Server2005中SUM函数内嵌套IF语句
[introduction to Expo application] v Expert recommendation letter template
Skillfully use 5 keys to improve office efficiency
经纬恒润再次荣获PACCAR集团 10PPM 质量奖









