Solved

maximum columns in a table

Posted on 2002-07-03
3
2,972 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
Comment Utility
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 34

Expert Comment

by:Mark Geerlings
Comment Utility
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
Comment Utility
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.

Join & Write a Comment

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now