`
hua04104
  • 浏览: 244838 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

ORA-01795:列表中的最大表达式数为1000解决方法

 
阅读更多
原因:SQL里面的IN中的数据量不能超过1000条
解决办法:
例如
Select * from tablename where col in (‘col1’,’col2’ ……..)
如果in 后面的Item过多的话,超过1000就会出现这种错误。
解决方法是:
Select * from tablename where col in (‘col1’,’col2’ …….., ‘col1000’) or col in (‘col1001’, …………)

在构建SQL语句时稍微注意一下就好了。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics