Home > Database > Oracle > Drop function in oracle

Drop function in oracle

下次还敢
Release: 2024-05-08 20:00:25
Original
581 people have browsed it

The DROP command in Oracle can delete database objects (tables, views, indexes, triggers). This command cannot be reversed and will delete all dependent objects. Usage: DROP ;Object types include TABLE, VIEW, INDEX, and TRIGGER. Use the CASCADE keyword to cascade the deletion of dependent objects.

Drop function in oracle

The role of DROP command in Oracle

The DROP command is used to delete database objects, such as tables, from the Oracle database , views, indexes and triggers.

Usage

<code>DROP <对象类型> <对象名称>;</code>
Copy after login

Object Type

  • TABLE: Delete table.
  • VIEW: Delete the view.
  • INDEX: Delete index.
  • TRIGGER: Delete trigger.

Explanation

  • The DROP command is irreversible, and the deleted objects cannot be recovered.
  • The DROP command will also delete all dependent objects associated with the object.
  • Use the CASCADE keyword to cascade deleted dependent objects.
  • If the object is in use, it cannot be deleted.

Example

Delete the table named "customers":

<code>DROP TABLE customers;</code>
Copy after login

Delete the table named View of "customer_view":

<code>DROP VIEW customer_view;</code>
Copy after login

Delete the index named "customer_idx":

<code>DROP INDEX customer_idx;</code>
Copy after login

Cascade delete named "customer_trigger" Triggers and their dependent objects:

<code>DROP TRIGGER customer_trigger CASCADE;</code>
Copy after login

The above is the detailed content of Drop function in oracle. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template