Oracle8i SQL Reference
Release 3 (8.1.7)

Part Number A85397-01

Library

Product

Contents

Index

Go to previous page Go to beginning of chapter Go to next page

SQL Statements:
CREATE SYNONYM to DROP ROLLBACK SEGMENT, 13 of 31


DROP CLUSTER

Purpose

Use the DROP CLUSTER clause to remove a cluster from the database.

You cannot uncluster an individual table. Instead you must perform these steps:

  1. Create a new table with the same structure and contents as the old one, but with no CLUSTER clause.

  2. Drop the old table.

  3. Use the RENAME statement to give the new table the name of the old one.

  4. Grant privileges on the new unclustered table, as grants on the old clustered table do not apply.

    See Also: CREATE TABLE, DROP TABLE, RENAME, GRANT for information on these steps 

Prerequisites

The cluster must be in your own schema or you must have the DROP ANY CLUSTER system privilege.

Syntax


Keywords and Parameters

schema

Specify the schema containing the cluster. If you omit schema, Oracle assumes the cluster is in your own schema.

cluster

Specify the name of the cluster to be dropped. Dropping a cluster also drops the cluster index and returns all cluster space, including data blocks for the index, to the appropriate tablespace(s).

INCLUDING TABLES

Specify INCLUDING TABLES to drop all tables that belong to the cluster.

CASCADE CONSTRAINTS

Specify CASCADE CONSTRAINTS to drop all referential integrity constraints from tables outside the cluster that refer to primary and unique keys in tables of the cluster. If you omit this clause and such referential integrity constraints exist, Oracle returns an error and does not drop the cluster.

Example

DROP CLUSTER Example

This statement drops a cluster named geography, all its tables, and any referential integrity constraints that refer to primary or unique keys in those tables:

DROP CLUSTER geography 
    INCLUDING TABLES 
    CASCADE CONSTRAINTS; 

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index