Oracle AI Database 26ai — Wide Tables
Before Oracle AI Database 26ai , the maximum number of columns allowed in a table or view was limited to 1000 . If this limit was exceeded, Oracle would raise the following error: ORA -01792 : maximum number of columns in a table or view is 1000 Starting with Oracle AI Database 26ai , this limitation has been significantly expanded, allowing each table to contain up to 4096 columns . To take advantage of this new capability, the initialization parameter max_columns must be set to extended : SQL > alter system set max_columns = extended scope = spfile; System altered SQL > startup force After restarting the database, you can create or modify tables with more than 1000 columns. The following example demonstrates how to add columns up to this new limit: SQL > declare 2 comm varchar2( 100 ); 3 begin 4 for i in 2. .4095 loop 5 comm: = 'alter table tb add c' || '' || i || ' number' ; 6 exec...