In this section we will see about how to handle IN clause limitation exceeding > 1000 values(ORA-01795 Error) in oracle.
Consider the following query
SELECT*FROM BOOKS WHERE AUTHOR_NAME IN(‘J.K ROWLING’,’PAULO COELHO ’,’JOHN GRISHAM’);
The above query will return results containing for the given author names in where clause. But there is a limitation that the IN clause cannot have more than 1000 values. Mostly the work around will be to loop through the select statement for 10 times if there are 10000 values.