Oracle как удалить все таблицы из
Use the DROP TABLE statement to move a table or object table to the recycle bin or to remove the table and all its data from the database entirely.
Unless you specify the PURGE clause, the DROP TABLE statement does not result in space being released back to the tablespace for use by other objects, and the space continues to count toward the user's space quota.
For an external table, this statement removes only the table metadata in the database. It has no affect on the actual data, which resides outside of the database.
When you drop a table that is part of a cluster, the table is moved to the recycle bin. However, if you subsequently drop the cluster, the table is purged from the recycle bin and can no longer be recovered with a FLASHBACK TABLE operation.
Dropping a table invalidates dependent objects and removes object privileges on the table. If you want to re-create the table, then you must regrant object privileges on the table, re-create the indexes, integrity constraints, and triggers for the table, and respecify its storage parameters. Truncating has none of these effects. Therefore, removing rows with the TRUNCATE statement can be more efficient than dropping and re-creating a table.
CREATE TABLE and ALTER TABLE for information on creating and modifying tables
TRUNCATE and DELETE for information on removing data from a table
FLASHBACK TABLE for information on retrieving a dropped table from the recycle bin
The table must be in your own schema or you must have the DROP ANY TABLE system privilege.
You can perform DDL operations (such as ALTER TABLE , DROP TABLE , CREATE INDEX ) on a temporary table only when no session is bound to it. A session becomes bound to a temporary table by performing an INSERT operation on the table. A session becomes unbound to the temporary table by issuing a TRUNCATE statement or at session termination, or, for a transaction-specific temporary table, by issuing a COMMIT or ROLLBACK statement.
Specify the schema containing the table. If you omit schema , then Oracle Database assumes the table is in your own schema.
Specify the name of the table to be dropped. Oracle Database automatically performs the following operations:
All rows from the table are dropped.
All table indexes and domain indexes are dropped, as well as any triggers defined on the table, regardless of who created them or whose schema contains them. If table is partitioned, then any corresponding local index partitions are also dropped.
All the storage tables of nested tables and LOBs of table are dropped.
When you drop a range-, hash-, or list-partitioned table, then the database drops all the table partitions. If you drop a composite-partitioned table, then all the partitions and subpartitions are also dropped.
When you drop a partitioned table with the PURGE keyword, the statement executes as a series of subtransactions, each of which drops a subset of partitions or subpartitions and their metadata. This division of the drop operation into subtransactions optimizes the processing of internal system resource consumption (for example, the library cache), especially for the dropping of very large partitioned tables. As soon as the first subtransaction commits, the table is marked UNUSABLE . If any of the subtransactions fails, the only operation allowed on the table is another DROP TABLE . PURGE statement. Such a statement will resume work from where the previous DROP TABLE statement failed, assuming that you have corrected any errors that the previous operation encountered.
You can list the tables marked UNUSABLE by such a drop operation by querying the status column of the *_TABLES , *_PART_TABLES , *_ALL_TABLES , or *_OBJECT_TABLES data dictionary views, as appropriate.
Oracle Database Administrator's Guide for more information on dropping partitioned tables.
For an index-organized table, any mapping tables defined on the index-organized table are dropped.
For a domain index, the appropriate drop routines are invoked. Please refer to Oracle Data Cartridge Developer's Guide for more information on these routines.
If any statistic types are associated with the table, then the database disassociates the statistics types with the FORCE clause and removes any user-defined statistics collected with the statistics type.
ASSOCIATE STATISTICS and DISASSOCIATE STATISTICS for more information on statistics type associations
If the table is not part of a cluster, then the database returns all data blocks allocated to the table and its indexes to the tablespaces containing the table and its indexes.
To drop a cluster and all its the tables, use the DROP CLUSTER statement with the INCLUDING TABLES clause to avoid dropping each table individually. See DROP CLUSTER.
If the table is a base table for a view, a container or master table of a materialized view, or if it is referenced in a stored procedure, function, or package, then the database invalidates these dependent objects but does not drop them. You cannot use these objects unless you re-create the table or drop and re-create the objects so that they no longer depend on the table.
If you choose to re-create the table, then it must contain all the columns selected by the subqueries originally used to define the materialized views and all the columns referenced in the stored procedures, functions, or packages. Any users previously granted object privileges on the views, stored procedures, functions, or packages need not be regranted these privileges.
If the table is a master table for a materialized view, then the materialized view can still be queried, but it cannot be refreshed unless the table is re-created so that it contains all the columns selected by the defining query of the materialized view.
If the table has a materialized view log, then the database drops this log and any other direct-path INSERT refresh information associated with the table.
Restriction on Dropping Tables You cannot directly drop the storage table of a nested table. Instead, you must drop the nested table column using the ALTER TABLE . DROP COLUMN clause.
Specify CASCADE CONSTRAINTS to drop all referential integrity constraints that refer to primary and unique keys in the dropped table. If you omit this clause, and such referential integrity constraints exist, then the database returns an error and does not drop the table.
Specify PURGE if you want to drop the table and release the space associated with it in a single step. If you specify PURGE , then the database does not place the table and its dependent objects into the recycle bin.
You cannot roll back a DROP TABLE statement with the PURGE clause, nor can you recover the table if you have dropped it with the PURGE clause.
Using this clause is equivalent to first dropping the table and then purging it from the recycle bin. This clause lets you save one step in the process. It also provides enhanced security if you want to prevent sensitive material from appearing in the recycle bin.
Oracle Database Administrator's Guide for information on the recycle bin and naming conventions for objects in the recycle bin
Dropping a Table: Example The following statement drops the oe.list_customers table created in "List Partitioning Example".
Oracle оператор DELETE используется для удаления одной или нескольких записей из таблицы в Oracle.
Синтаксис
Синтаксис оператора DELETE в Oracle/PLSQL:
Параметры или аргументы
Таблица из которой вы хотите удалить записи.
Необязательный. Условия, которые должны быть выполнены для удаляемых записей. Если не предусмотрено никаких условий, то все записи из таблицы будут удалены.
Примечание
Вам не нужно перечислять поля в Oracle DELETE, поскольку вы удалите всю строку из таблицы.
Пример использования с одним условием
Рассмотрим простой Oracle пример DELETE, где в запросе DELETE есть только одно условие.
Этот пример DELETE удалит все записи из таблицы customers , где last_name является John.
Вы можете проверить количество строк, которые будут удалены. Вы можете определить количество строк, которые будут удалены, выполнив следующее Oracle предложение SELECT, перед выполнением удаления.
Пример использования двух условий
Рассмотрим пример, когда в DELETE просто два условия.
Этот пример DELETE удалит все записи из таблицы customers , где last_name является Anderson и customer_id больше 25.
Вы можете проверить количество строк, которые будут удалены. Вы можете определить количество строк, которые будут удалены, выполнив следующее предложение SELECT, перед выполнением удаления.
Пример использования условия EXISTS
Вы можете, также выполнять более сложные операции удаления.
Вы можете удалять записи в одной таблице на основе значений в другой таблице. Так как, при удалении, вы не можете перечислить более одной таблицы в FROM, вы можете использовать Oracle условие EXISTS.
Этот Oracle пример DELETE удалит все записи в таблице suppliers , где есть запись в таблице customers , чьи customer_id больше 25, а customer_id соответствует supplier_id .
Если вы хотите определить количество строк, которые будут удалены, вы можете запустить, перед выполнением удаления, следующее Oracle предложение SELECT.
Как я могу удалить все пользовательские таблицы в Oracle?
У меня проблема с ограничениями. Когда я отключаю все это по-прежнему невозможно.
это зависит от того, что вы намеревались сделать. Вы также можете использовать опущенный пользовательский каскад, но вам нужно заново создать пользователя.
Это сработало очень хорошо, и мне не нужны полномочия на сервере Oracle для удаления и повторного добавления моего пользователя. Браво. Отличный ответ.
Я получаю java.lang.IllegalArgumentException: SQL не выбран для выполнения .. Моя идея заключается в том, что cur_rec не объявлен. Как объявить это, так как он состоит из bject_name, object_type?
Я думаю, что сценарий может быть опасным. Если вы подключены как SYSDBA, то он удаляет ВСЕ таблицы ВСЕХ пользователей, а также ВСЕ системные таблицы. На практике вы удаляете всю БД. Быть осторожен!
Это полезно для пользователей, имеющих разрешение на определенную схему, но не разрешение dba в среде разработки.
Если вы просто хотите действительно простой способ сделать это .. Вот сценарий, который я использовал в прошлом
Это выведет серию команд удаления для всех таблиц в схеме. Подпишите результат этого запроса и выполните его.
Аналогично, если вы хотите очистить не только таблицы, вы можете отредактировать следующее в соответствии со своими потребностями.
Обратите внимание, что это работает сразу после запуска. Он НЕ производит сценарий, который нужно вставить куда-то (как и другие ответы здесь). Он работает прямо на БД.
Это работает для меня, но я должен был процитировать название таблицы, написав 'DROP TABLE "' || c.table_name || '" CASCADE CONSTRAINTS' . Это необходимо, если имена таблиц строчные.
@ очень приятно это знать! Я использую только заглавные таблицы, поэтому я никогда не сталкивался с этим.
+1 @ceving также нужно в случае, если ваше имя таблицы является зарезервированным словом. Кроме того, я бы добавил PURGE в конце DROP заявления.
Самый простой способ - удалить пользователя, которому принадлежат объекты, с помощью команды cascade.
Это не правильный метод. Это метод удаления пользователя, когда пользователь создал объекты, который требует использования CASCADE для удаления пользовательских таблиц непосредственно перед удалением пользователя. Удаление пользователя не тот вопрос, который он задал.
Он очень эффективно выполняет задачу, особенно если схема большая. Похоже, что в вашем случае исключение любого общения с вашим администратором базы данных является высоким приоритетом. Я предпочитаю решения, которые способствуют отношениям с вашим администратором баз данных, особенно если у вас нет привилегий администратора баз данных.
@ Брайан, ты ошибаешься. Иногда нет вообще никакого DBA, или он находится в другой компании. Или самый обычный случай - он не даст вам доступа к тому, что вам нужно.
Будучи новичком в Oracle, я больше знаком с MySQL; Сброс БД кажется трудным. В MySQL а USER является отдельным для DATABASE . DROP USER username CASCADE работал на меня. Но в MySQL все, что мне нужно сделать, это DROP DATABASE создать новый
Это эффективно для удаления всей базы данных, включая таблицы, если у вас есть 1) сценарий «CREATE USER», удобный со всеми точными разрешениями для воссоздания базы данных; и 2) разрешение на запуск этого скрипта. Если все, что вам нужно сделать, это удалить таблицы, то другие упомянутые подходы (@kazanaki) являются более подходящими.
Самый простой способ - сбросить табличное пространство, а затем восстановить его. Но я бы предпочел не делать этого. Это похоже на Генри за исключением того, что я просто копирую / вставляю набор результатов в моем графическом интерфейсе.
user_tables системная таблица, которая содержит все таблицы пользователя. Предложение SELECT будет генерировать оператор DROP для каждой таблицы, в которой вы можете запустить скрипт
Use the DROP TABLE statement to move a table or object table to the recycle bin or to remove the table and all its data from the database entirely.
Unless you specify the PURGE clause, the DROP TABLE statement does not result in space being released back to the tablespace for use by other objects, and the space continues to count toward the user's space quota.
For an external table, this statement removes only the table metadata in the database. It has no affect on the actual data, which resides outside of the database.
When you drop a table that is part of a cluster, the table is moved to the recycle bin. However, if you subsequently drop the cluster, then the table is purged from the recycle bin and can no longer be recovered with a FLASHBACK TABLE operation.
Dropping a table invalidates dependent objects and removes object privileges on the table. If you want to re-create the table, then you must regrant object privileges on the table, re-create the indexes, integrity constraints, and triggers for the table, and respecify its storage parameters. Truncating has none of these effects. Therefore, removing rows with the TRUNCATE statement can be more efficient than dropping and re-creating a table.
CREATE TABLE and ALTER TABLE for information on creating and modifying tables
TRUNCATE TABLE and DELETE for information on removing data from a table
FLASHBACK TABLE for information on retrieving a dropped table from the recycle bin
The table must be in your own schema or you must have the DROP ANY TABLE system privilege.
You can perform DDL operations (such as ALTER TABLE , DROP TABLE , CREATE INDEX ) on a temporary table only when no session is bound to it. A session becomes bound to a temporary table by performing an INSERT operation on the table. A session becomes unbound to the temporary table by issuing a TRUNCATE statement or at session termination, or, for a transaction-specific temporary table, by issuing a COMMIT or ROLLBACK statement.
Dropping Private Temporary Tables
You can drop a private temporary table using the existing DROP TABLE command. Dropping a private temporary table will not commit an existing transaction. This applies to both transaction-specific and session-specific private temporary tables. Note that a dropped private temporary table will not go into the RECYCLEBIN .
Dropping Immutable Tables
Use the DROP TABLE statement to drop an immutable table. It is recommended that you include the PURGE option while dropping an immutable table. Dropping an immutable table removes its definition from the data dictionary, deletes all its rows, and deletes any indexes and triggers defined on the table.
The immutable table must be contained in your schema, or you must have the DROP ANY TABLE system privilege.
An immutable table can be dropped only after it has not been modified for a period of time that is defined by its retention period.
An empty immutable table can be dropped regardless of its retention period.
Specify the schema containing the table. If you omit schema , then Oracle Database assumes the table is in your own schema.
Specify the name of the table to be dropped. Oracle Database automatically performs the following operations:
All rows from the table are dropped.
All table indexes and domain indexes are dropped, as well as any triggers defined on the table, regardless of who created them or whose schema contains them. If table is partitioned, then any corresponding local index partitions are also dropped.
All the storage tables of nested tables and LOBs of table are dropped.
When you drop a range-, hash-, or list-partitioned table, then the database drops all the table partitions. If you drop a composite-partitioned table, then all the partitions and subpartitions are also dropped.
When you drop a partitioned table with the PURGE keyword, the statement executes as a series of subtransactions, each of which drops a subset of partitions or subpartitions and their metadata. This division of the drop operation into subtransactions optimizes the processing of internal system resource consumption (for example, the library cache), especially for the dropping of very large partitioned tables. As soon as the first subtransaction commits, the table is marked UNUSABLE . If any of the subtransactions fails, then the only operation allowed on the table is another DROP TABLE . PURGE statement. Such a statement will resume work from where the previous DROP TABLE statement failed, assuming that you have corrected any errors that the previous operation encountered.
You can list the tables marked UNUSABLE by such a drop operation by querying the status column of the *_TABLES , *_PART_TABLES , *_ALL_TABLES , or *_OBJECT_TABLES data dictionary views, as appropriate.
Oracle Database VLDB and Partitioning Guide for more information on dropping partitioned tables.
For an index-organized table, any mapping tables defined on the index-organized table are dropped.
For a domain index, the appropriate drop routines are invoked. Refer to Oracle Database Data Cartridge Developer's Guide for more information on these routines.
If any statistics types are associated with the table, then the database disassociates the statistics types with the FORCE clause and removes any user-defined statistics collected with the statistics type.
ASSOCIATE STATISTICS and DISASSOCIATE STATISTICS for more information on statistics type associations
If the table is not part of a cluster, then the database returns all data blocks allocated to the table and its indexes to the tablespaces containing the table and its indexes.
To drop a cluster and all its the tables, use the DROP CLUSTER statement with the INCLUDING TABLES clause to avoid dropping each table individually. See DROP CLUSTER.
If the table is a base table for a view, a container or master table of a materialized view, or if it is referenced in a stored procedure, function, or package, then the database invalidates these dependent objects but does not drop them. You cannot use these objects unless you re-create the table or drop and re-create the objects so that they no longer depend on the table.
If you choose to re-create the table, then it must contain all the columns selected by the subqueries originally used to define the materialized views and all the columns referenced in the stored procedures, functions, or packages. Any users previously granted object privileges on the views, stored procedures, functions, or packages need not be regranted these privileges.
If the table is a master table for a materialized view, then the materialized view can still be queried, but it cannot be refreshed unless the table is re-created so that it contains all the columns selected by the defining query of the materialized view.
If the table has a materialized view log, then the database drops this log and any other direct-path INSERT refresh information associated with the table.
Restrictions on Dropping Tables
You cannot directly drop the storage table of a nested table. Instead, you must drop the nested table column using the ALTER TABLE . DROP COLUMN clause.
You cannot drop the parent table of a reference-partitioned table. You must first drop all reference-partitioned child tables.
You cannot drop a table that uses a flashback data archive for historical tracking. You must first disable the table's use of the flashback archive.
Specify CASCADE CONSTRAINTS to drop all referential integrity constraints that refer to primary and unique keys in the dropped table. If you omit this clause, and such referential integrity constraints exist, then the database returns an error and does not drop the table.
Specify PURGE if you want to drop the table and release the space associated with it in a single step. If you specify PURGE , then the database does not place the table and its dependent objects into the recycle bin.
You cannot roll back a DROP TABLE statement with the PURGE clause, nor can you recover the table if you have dropped it with the PURGE clause.
Using this clause is equivalent to first dropping the table and then purging it from the recycle bin. This clause lets you save one step in the process. It also provides enhanced security if you want to prevent sensitive material from appearing in the recycle bin.
Oracle Database Administrator's Guide for information on the recycle bin and naming conventions for objects in the recycle bin
Dropping a Table: Example
The following statement drops the oe.list_customers table created in "List Partitioning Example" .
For you to delete rows from a table, the table must be in your own schema or you must have the DELETE object privilege on the table.
For you to delete rows from an updatable materialized view, the materialized view must be in your own schema or you must have the DELETE object privilege on the materialized view.
For you to delete rows from the base table of a view, the owner of the schema containing the view must have the DELETE object privilege on the base table. Also, if the view is in a schema other than your own, you must have the DELETE object privilege on the view.
The DELETE ANY TABLE system privilege also allows you to delete rows from any table or table partition or from the base table of any view.
You must also have the SELECT object privilege on the object from which you want to delete if:
The object is on a remote database or
The SQL92_SECURITY initialization parameter is set to TRUE and the DELETE operation references table columns, such as the columns in a where_clause
Specify a comment that passes instructions to the optimizer on choosing an execution plan for the statement.
Use the FROM clause to specify the database objects from which you are deleting rows.
The ONLY syntax is relevant only for views. Use the ONLY clause if the view in the FROM clause belongs to a view hierarchy and you do not want to delete rows from any of its subviews.
Use this clause to specify the objects from which data is being deleted.
Specify the schema containing the table or view. If you omit schema , then Oracle Database assumes the table or view is in your own schema.
table | view | materialized view | subquery
Specify the name of a table, view, materialized view, or the column or columns resulting from a subquery, from which the rows are to be deleted.
When you delete rows from an updatable view, Oracle Database deletes rows from the base table.
You cannot delete rows from a read-only materialized view. If you delete rows from a writable materialized view, then the database removes the rows from the underlying container table. However, the deletions are overwritten at the next refresh operation. If you delete rows from an updatable materialized view that is part of a materialized view group, then the database also removes the corresponding rows from the master table.
If table or the base table of view or the master table of materialized_view contains one or more domain index columns, then this statements executes the appropriate indextype delete routine.
Oracle Data Cartridge Developer's Guide for more information on these routines
Issuing a DELETE statement against a table fires any DELETE triggers defined on the table.
All table or index space released by the deleted rows is retained by the table and index.
Specify the name of the partition or subpartition targeted for deletes within the object.
You need not specify the partition name when deleting values from a partitioned object. However, in some cases, specifying the partition name is more efficient than a complicated where_clause .
Specify the complete or partial name of a database link to a remote database where the object is located. You can delete rows from a remote object only if you are using Oracle Database distributed functionality.
If you omit dblink , then the database assumes that the object is located on the local database.
The subquery_restriction_clause lets you restrict the subquery in one of the following ways:
WITH READ ONLY Specify WITH READ ONLY to indicate that the table or view cannot be updated.
WITH CHECK OPTION Specify WITH CHECK OPTION to indicate that Oracle Database prohibits any changes to the table or view that would produce rows that are not included in the subquery. When used in the subquery of a DML statement, you can specify this clause in a subquery in the FROM clause but not in subquery in the WHERE clause.
CONSTRAINT constraint Specify the name of the CHECK OPTION constraint. If you omit this identifier, then Oracle automatically assigns the constraint a name of the form SYS_C n , where n is an integer that makes the constraint name unique within the database.
The table_collection_expression lets you inform Oracle that the value of collection_expression should be treated as a table for purposes of query and DML operations. The collection_expression can be a subquery, a column, a function, or a collection constructor. Regardless of its form, it must return a collection value—that is, a value whose type is nested table or varray. This process of extracting the elements of a collection is called collection unnesting .
The optional plus (+) is relevant if you are joining the TABLE expression with the parent table. The + creates an outer join of the two, so that the query returns rows from the outer table even if the collection expression is null.
In earlier releases of Oracle, when collection_expression was a subquery, table_collection_expression was expressed as THE subquery . That usage is now deprecated.
You can use a table_collection_expression in a correlated subquery to delete rows with values that also exist in another table.
collection_expression Specify a subquery that selects a nested table column from the object from which you are deleting.
Restrictions on the dml_table_expression_clause Clause This clause is subject to the following restrictions:
You cannot execute this statement if table or the base or master table of view or materialized_view contains any domain indexes marked IN_PROGRESS or FAILED.
You cannot insert into a partition if any affected index partitions are marked UNUSABLE .
You cannot specify the ORDER BY clause in the subquery of the DML_table_expression_clause .
You cannot delete from a view except through INSTEAD OF triggers if the defining query of the view contains one of the following constructs:
If you specify an index, index partition, or index subpartition that has been marked UNUSABLE , the DELETE statement will fail unless the SKIP_UNUSABLE_INDEXES initialization parameter has been set to true .
Use the where_clause to delete only rows that satisfy the condition. The condition can reference the object from which you are deleting and can contain a subquery. You can delete rows from a remote object only if you are using Oracle Database distributed functionality. Please refer to Chapter 7, "Conditions" for the syntax of condition .
If this clause contains a subquery that refers to remote objects, then the DELETE operation can run in parallel as long as the reference does not loop back to an object on the local database. However, if the subquery in the DML_table_expression_clause refers to any remote objects, then the DELETE operation will run serially without notification. Please refer to the parallel_clause in the CREATE TABLE documentation for additional information.
If you omit dblink , then the database assumes that the table or view is located on the local database.
If you omit the where_clause , then the database deletes all rows of the object.
t_alias Provide a correlation name for the table, view, materialized view, subquery, or collection value to be referenced elsewhere in the statement. This alias is required if the DML_table_expression_clause references any object type attributes or object type methods. Table aliases are generally used in DELETE statements with correlated queries.
This clause lets you return values from deleted columns, and thereby eliminate the need to issue a SELECT statement following the DELETE statement.
The returning clause retrieves the rows affected by a DML statement. You can specify this clause for tables and materialized views and for views with a single base table.
When operating on a single row, a DML statement with a returning_clause can retrieve column expressions using the affected row, rowid, and REFs to the affected row and store them in host variables or PL/SQL variables.
When operating on multiple rows, a DML statement with the returning_clause stores values from expressions, rowids, and REFs involving the affected rows in bind arrays.
expr Each item in the expr list must be a valid expression syntax.
INTO The INTO clause indicates that the values of the changed rows are to be stored in the variable(s) specified in data_item list.
data_item Each data_item is a host variable or PL/SQL variable that stores the retrieved expr value.
For each expression in the RETURNING list, you must specify a corresponding type-compatible PL/SQL variable or host variable in the INTO list.
Restrictions The following restrictions apply to the RETURNING clause:
The expr is restricted as follows:
For UPDATE and DELETE statements each expr must be a simple expression or a single-set aggregate function expression. You cannot combine simple expressions and single-set aggregate function expressions in the same returning_clause . For INSERT statements, each expr must be a simple expression. Aggregate functions are not supported in an INSERT statement RETURNING clause.
Single-set aggregate function expressions cannot include the DISTINCT keyword.
If the expr list contains a primary key column or other NOT NULL column, then the update statement fails if the table has a BEFORE UPDATE trigger defined on it.
You cannot specify the returning_clause for a multitable insert.
You cannot use this clause with parallel DML or with remote objects.
You cannot retrieve LONG types with this clause.
You cannot specify this clause for a view on which an INSTEAD OF trigger has been defined.
PL/SQL User's Guide and Reference for information on using the BULK COLLECT clause to return multiple values to collection variables
The error_logging_clause has the same behavior in DELETE statement as it does in an INSERT statement. Please refer to the INSERT statement error_logging_clause for more information.
Deleting Rows: Examples The following statement deletes all rows from the sample table oe.product_descriptions where the value of the language_id column is AR :
The following statement deletes from the sample table hr.employees purchasing clerks whose commission rate is less than 10%:
The following statement has the same effect as the preceding example, but uses a subquery:
Deleting Rows from a Remote Database: Example The following statement deletes specified rows from the locations table owned by the user hr on a database accessible by the database link remote :
Deleting Nested Table Rows: Example For an example that deletes nested table rows, please refer to "Table Collections: Examples".
Deleting Rows from a Partition: Example The following example removes rows from partition sales_q1_1998 of the sh.sales table:
Using the RETURNING Clause: Example The following example returns column salary from the deleted rows and stores the result in bind variable :bnd1 . The bind variable must already have been declared.
Читайте также: