Name

DROP USER

Synopsis

DROP USER username [CASCADE]

The DBA’s favorite command, this statement removes a user (username) from the database.

Keyword

CASCADE

Specifies that all objects in the user’s schema will be dropped before removing the user. This keyword must be specified if the user schema contains any objects.

Notes

You must have the DROP USER privilege to remove a user from the database. Note that if you specify the CASCADE option, any referential integrity constraints on tables in other schemas that refer to primary and unique keys on tables in this schema will also be dropped. If tables or other database objects in this schema are referred to by views, synonyms, or stored procedures, functions, or packages in another schema, those referring objects will be marked invalid but not dropped.

Example

The following example removes the user debby and the contents of her schema from the database:

DROP USER debby CASCADE
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset