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 |
Table Has C1 And C2 Column If Exits any record in c1 then Update c2 record Otherwise insert new record in the C1 And C2 (Using Procedure)
How can I introduce multiple conditions in like operator?
How to define a procedure inside another procedure?
what is the difference between table and veiw?
Can you tell me how to add new column in existing views?how?How is possible?
what are bitmap indexes? How does they work?
What do you mean by cdb and pdb in oracle 12c?
State any two functions of oracle?
What is a directory object?
What is a private synonym?
How to rename a tablespace in oracle?
How to use "if" statements on multiple conditions?