How To Delete All Rows a Table in Oracle?
Submitted by: AdministratorIf you want to delete all rows from a table, you have two options:
* Use the DELETE statement with no WHERE clause.
* Use the TRUNCATE TABLE statement.
The TRUNCATE statement is more efficient the DELETE statement. The tutorial exercise shows you a good example of TRUNCATE statement:
SELECT COUNT(*) FROM ggl_links;
COUNT(*)
----------
3
TRUNCATE TABLE ggl_links;
Table truncated.
SELECT COUNT(*) FROM ggl_links;
COUNT(*)
----------
0
Submitted by: Administrator
* Use the DELETE statement with no WHERE clause.
* Use the TRUNCATE TABLE statement.
The TRUNCATE statement is more efficient the DELETE statement. The tutorial exercise shows you a good example of TRUNCATE statement:
SELECT COUNT(*) FROM ggl_links;
COUNT(*)
----------
3
TRUNCATE TABLE ggl_links;
Table truncated.
SELECT COUNT(*) FROM ggl_links;
COUNT(*)
----------
0
Submitted by: Administrator
Read Online Oracle Database Job Interview Questions And Answers
Top Oracle Database Questions
☺ | What Happens to Indexes If You Drop a Table? |
☺ | How To Recover a Dropped Table in Oracle? |
☺ | How To Create Tables for ODBC Connection Testing? |
☺ | How To Retrieve Data from an Explicit Cursor? |
☺ | What Is a Table Index in Oracle? |
Top DB Oracle Categories
☺ | Oracle PL-SQL Interview Questions. |
☺ | Oracle DBA Interview Questions. |
☺ | Oracle D2K Interview Questions. |
☺ | OCI Interview Questions. |
☺ | Oracle RMAN Interview Questions. |