Compare and contrast TRUNCATE and DELETE for a table.
Answers were Sorted based on User's Feedback
Answer / mkjmkumar
Delete :
1. It is a DML
2. Speed is Slow
3. We can Use Where Clause.
4. Check Constraints Before delete.
Truncate
1. It is a DDL.
2. Speed is Fast
3. We Cant Use Where Clause
4. Delete All Rows without check of constraints.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / zikku
Truncate command permanently deletes the information from a
table even after rollback we can't get that information.
Delete command temporarily deletes information from a table
after rollback we can get the information back.
| Is This Answer Correct ? | 5 Yes | 0 No |
DELETE: IT IS A DML COMMAND(DATA MANIPULATION LANGUAGE) .
IT DELETES DATA MEANS (DELETES ALL RECORDS) IN TABLE.
BUT STRUCTURE WILL BE THERE.
AND
DATA DELETES TEMPERORLY.
THEN USE ROLLBACK WE CAN GET THE DATA.
TRUNCATE: IT IS A DDL COMMAND (DATA DEFNITION LANGUAGE).
TRUNCATE ALL RECORDS IN A TABLE.
BUT STRUCTURE WILL BE THERE.
BUT DATA GOES PERMINANTLY.
WE CANT USE ROLLBACK HERE.
IT SHOLUD NOT WORK. WHY BCZ DATA TRUNCATES
PERMENANTLY.
| Is This Answer Correct ? | 1 Yes | 0 No |
how to display last 5 letters from a name (take emp table ename )
Where would you look for errors from the database engine?
Explain the difference between a data block, an extent and a segment.
How to find locks exists in a table or not?
What is mrc and what is its use? : oracle accounts receivable
Describe what redo logs are.
How client makes connection with server in client/server architecture?
What do you mean by hz_ in customer tables? : oracle accounts receivable
What is supporting issues GL AP and AR?
hi iam kavya, i completed Oracle11i(finance module), i do not know how to face the interview questions please adivese me
1. What is PO rate variance gain and loss?
Give the stages of instance startup to a usable state where normal users may access it.