Free Newsletters:
Database Journal  
DBAnews  

DBASupport

 The Knowledge Center for Oracle Professionals

Search DBAsupport:
 
HOME 11g Central 10g Central 9i Central 8i Central Oracle News Scripts FAQ OCP Zone Resources Technical Docs Tools & Utilities Forums
internet.com

» HOME
» FEATURES
    11g Central
    10g Central
    9i Central
    8i Central
    Oracle News
» COMMUNITY
    Scripts
    Forums
    FAQ
    OCP Zone
» RESOURCES
    Resources
    Technical Docs
    Tools & Utilities
    Tech Jobs

Marketplace Partners
Become a Marketplace Partner


internet.commerce
Be a Commerce Partner












internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


   DBAsupport.com > Oracle > Oracle 8i Central > Featured Stories




Information Technology Auditor (PA)
Next Step Systems
US-PA-Wayne

Justtechjobs.com Post A Job | Post A Resume

Oracle 8i adds a new feature to drop and set unused columns in a table. First feature allows you to mark a column as unused and the second one lets you drop the unused column from the table to create more free space. Lets look at them in detail.

Marking Columns in a Table as Unused

Columns in a table can be marked as unused. Unused columns are treated as if they were dropped, even though their column data remains in the table's rows. This feature is useful when you just dont want to drop the column during peak periods and want to remove the column from regular access.

Alter table dbatest set unused ( c3 );
Alter table dbatest set unused (c1, c4);

Until you actually drop the columns, the columns are counted towards the Overall Column Limit (1000) in Oracle 8.1 and also if you have a long column set to unused, you cannot add another long column until you are have dropped the old one. The dictionary views dba_unused_col_tabs and user_unused_col_tabs can be used to view the columns that are currently marked as unused.

Dropping a column or UnUsed Column from a Table

This feature drops the column from a table and releases any space back to the segment. When you use the drop column clause, it will also drop any columns that were previously marked as being unused. This clause also causes any indexes, constraints and statistics on this column to be dropped.

Alter table dbatest drop column ( c9 );
Alter table dbatest drop unused columns;

We just wanted to go one step ahead and drop all columns and Oracle reports a ORA-12983-Cannot drop all columns in a table.

Restrictions

You cannot combine drop an set unused clauses in the same statement. Also you cannot drop a column from an objecty type table or a nested table or a partitioning key column or a parent key column. Another good restriction is that you cannot drop a column from any of the tables owned by sys.


DBAsupport.com Home Page





internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Microsoft PDF: Top 10 Reasons to Move to Server Virtualization with Hyper-V
Microsoft PDF: Six Reasons Why Microsoft's Hyper-V Will Overtake Vmware
Microsoft Step-by-Step Guide: Hyper-V and Failover Clustering
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Microsoft PDF: Top 11 Reasons to Upgrade to Windows Server 2008
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
  PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
HP eBook: Guide to Storage Networking
MORE WHITEPAPERS, EBOOKS, AND ARTICLES