diff between DELETE and TRUNCATE?.
Answers were Sorted based on User's Feedback
Answer / sandeep desai
Some more additions
With Truncate command Oracle sets the High Water Mark to
Zero
whereas
With Delete command this doesn't happen since data is not
released from the memory
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / chaitanyabilla
delete-low water mark level
truncate-high water level
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sahaja mallarapu
Delete is a DML command.
Truncate is a DDL command.
Using delete we can delete specific rows by applying some
condition.
using truncate all rows are deleted. we cant apply any
condition here.
deleted rows can be rollbacked.
truncated rows cant be rollbacked.
memory occupied by deleted rows cant be reused.
memory occupied by truncated rows can be reused.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / padma
delete comd is used to delete not a specific record rather
all records without affecting the structure of the records
truncate comd is used to delete all the records from
existing table,retaining the structure o that table.
by using delete comd v can rollback all the delete
records .it is record level cmd
wherease truncate cmd v cannot rollback. it is table
level cmd
| Is This Answer Correct ? | 1 Yes | 3 No |
Can cursor variables be stored in PL/SQL tables.If yes how. If not why?
What is Partitions in Table ?
Difference between open_form and call_form in oracle.
what is primary key?
How many types of auditing in Oracle?
What is a cursor variable?
One Table having two rows with one colomn having values Like"Male" and "Female". how to upadte these values Like "Female" and "Male" in single update statement.
difference between oracle8i and oracle9i
What is Database Trigger ?
A and B are tables. x is a column. Then What is difference between A.x = B.x(+) and A.x = B.x ?
What do you mean by redo log file mirroring?
When do I need to use a semicolon vs a slash in oracle sql?