Basic Delete Statements |
Delete All Rows |
DELETE <table_name>
or
DELETE FROM <table_name>; |
CREATE TABLE t AS
SELECT *
FROM all_tables;
SELECT COUNT(*)
FROM t;
DELETE FROM t;
COMMIT;
SELECT COUNT(*)
FROM t; |
Delete Selective Rows |
DELETE FROM <table_name>
WHERE <condition>; |
CREATE TABLE t AS
SELECT *
FROM all_tables;
SELECT COUNT(*)
FROM t;
DELETE FROM t
WHERE table_name LIKE '%MAP';
COMMIT;
SELECT COUNT(*)
FROM t; |
Delete From A SELECT Statement |
DELETE FROM (<SELECT Statement>); |
CREATE TABLE t AS
SELECT *
FROM all_tables;
SELECT COUNT(*)
FROM t;
DELETE FROM (
SELECT * FROM t WHERE table_name LIKE '%MAP');
SELECT COUNT(*)
FROM t; |
Delete With Returning Clause |
DELETE FROM (<SELECT Statement>); |
CREATE TABLE t AS
SELECT *
FROM all_tables;
set serveroutput on
DECLARE
r urowid;
BEGIN
DELETE FROM t
WHERE rownum = 1
RETURNING rowid INTO r;
dbms_output.put_line(r);
END;
/ |
Delete Restricted To A Partition |
DELETE FROM <table_name>
PARTITION <partition_name>; |
DELETE FROM sales PARTITION (q1_2001_invoices); |
Delete From A Remote Database |
DELETE FROM <table_name>@<database_link> |
DELETE FROM t@remote_db; |
相关推荐
Oracle的SQL语句执行效率问题查找与解决方法。
Which two statements are true about space - saving features in an Oracle Database? A.An index created with the UNUSABLE attribute has no segment. B.Private Temporary Tables(PTTs)store metadata in ...
Written in an easygoing and example-based style, Beginning Oracle SQL is the book that will get you started down the path to successfully writing SQL statements and getting results from Oracle ...
6 Oracle9i Extensions to DML and DDL Statements Objectives 6-2 Review of the INSERT Statement 6-3 Review of the UPDATE Statement 6-4 Overview of Multitable INSERT Statements 6-5 Types of Multitable ...
SAP HANA SQL Statements All for all kinds of reports.
mytabis 报错 Mapped Statements collection does not contain value for
Explore datatypes, conditional and sequential control statements, loops, exception handling, security features, globalization and localization issues, and the PL/SQL architecture Understand and use ...
Filled with detailed examples and expert strategies from an Oracle ACE, Oracle Database 12c PL/SQL Programming explains how to retrieve and process data, write PL/SQL statements, execute effective ...
Structured Query Language (SQL) is the set of statements with which all programs and users access data in an Oracle database. Application programs and Oracle tools often allow users access to the ...
2017 Statutory Annual Report including IFRS Financial Statements
Explore datatypes, conditional and sequential control statements, loops, exception handling, security features, globalization and localization issues, and the PL/SQL architecture Understand and use ...
The Three Financial statements are related to each other
capabilities built into the Oracle database kernel. With this capability, ASM simplifies storage management tasks, such as creating/laying out databases and diskspace management. Since ASM allows disk...
The Oracle SQL*Plus Pocket Reference is a quick-reference guide to SQL*Plus and to commonly used SQL query and data manipulation statements. The purpose of this book is to help you find the syntax of ...
Readers should already know the basic four SQL statements, and be ready to learn deeply about Oracle’s specific implementation of the language, including Oracle-specific features and syntax....
1 Introduction and Upgrading 2 OCI Programming Basics 3 Datatypes 4 Using SQL Statements in OCI 5 Binding and Defining
The author freely shares his experience while explaining the underlying foundations of how SQL statements are executed by the Oracle database engine. You'll be able to draw a solid foundation of ...
Oracle Database. Chapter 3, “Analysis of Reproducible Problems,” describes how to identify performance problems with the help of SQL trace and PL/SQL profilers. Chapter 4, “Real-time Analysis of ...
Explore datatypes, conditional and sequential control statements, loops, exception handling, security features, globalization and localization issues, and the PL/SQL architecture Understand and use ...
HANA script for Admin