ORA-01792: maximum number of columns in a table or view is 1000 ORA-01792: maximum number of columns in a table or view is 1000 sql sql

ORA-01792: maximum number of columns in a table or view is 1000


ORA-01792: maximum number of columns in a table or view is 1000

This limit is not only applicable to tables and views, but also on the temporary inline view and the temporary internal memory tables which Oracle creates while executing a subquery.

For example,

Oracle creates a temporary inline view based on the merge select, thus the same restriction is implemented on this temporary inline view. So, you need to make sure that the number of columns in a sub-select or subquery also doesn't exceed this limit of 1000.

Caused by: org.hibernate.exception.SQLGrammarException: could not initialize a collection:

The above error indicates that you are trying to create a collection which exceeds the limit of number of columns allowed, i.e. the total number of columns exceeds 1000.


To avoid this Exception and to skip the check of this limit, you can set a _fix_control parameter,like:

ALTER SESSION SET "_fix_control"='17376322:OFF'

or

ALTER SYSTEM SET "_fix_control"='17376322:OFF'

(works with Oracle 12.1.0.2 Standard and Enterprise)