Is there a workaround for ORA-01795: maximum number of expressions in a list is 1000 error?

前端 未结 11 921
忘掉有多难
忘掉有多难 2020-11-27 16:14

Is there a workaround for

\'ORA-01795: maximum number of expressions in a list is 1000 error\'

I have a query and it is selecting fields based

11条回答
  •  心在旅途
    2020-11-27 17:06

    Just use multiple in-clauses to get around this:

    select field1, field2, field3 from table1 
    where  name in ('value1', 'value2', ..., 'value999') 
        or name in ('value1000', ..., 'value1999') 
        or ...;
    

提交回复
热议问题