Solved

maximum columns in a table

Posted on 2002-07-03
3
2,978 Views
Last Modified: 2012-06-27
1) How many columns can we include in a create table statement.
2)Does it depend on data types and sizes of the columns.
3) Is there a concept called page size in oracle. If so, what is it?

--- k_murli_krishna
0
Comment
Question by:k_murli_krishna
3 Comments
 
LVL 11

Accepted Solution

by:
pennnn earned 75 total points
ID: 7127483
1)1000
2)Yes - if it's an object table (see details below)
3) I'm not aware of such a concept. Which doesn't mean that it doesn't exist...
The same question was asked a few days ago:
http://www.experts-exchange.com/oracle/Q_20317109.html
Here's what I posted there:
From the SQL Reference:
"The absolute maximum number of columns in a table is 1000. However, when you create an object table (or a relational table with columns of object, nested table, varray, or REF type), Oracle maps the columns of the user-defined types to relational columns, creating in effect "hidden columns" that count toward the 1000-column limit. For details on how Oracle calculates the total number of columns in such a table, please refer to Oracle8i
Administrator’s Guide."
The same is valid for a view:
"The subquery’s select list can contain up to 1000 expressions."
Hope that helps!
0
 
LVL 35

Expert Comment

by:Mark Geerlings
ID: 7127500
1. That depends on your version of Oracle, the limits are higher in the higher versions.  I have never come close to the limit of columns in a table, so I don't pay much attention to the actual limit in each version.

2. No, unless you use some of the newer object types or user-defined types, but if you do use these then yes, because Oracle will then automatically create some additional hidden columns that must be included in the total number of columns.

3. No, not as far as I know.  Oracle stores data in blocks.  These are grouped into extents and segments.  Thay are contained in datafiles and tablespaces.
0
 
LVL 4

Expert Comment

by:asimkovsky
ID: 7129137
The concept of a "page size" is relevant to SQL Server, but it is basically the same concept of datablocks in Oracle. Oracle calls them datablocks, and SQL Server calls them pages.


Andrew

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question