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 |
I've got a database 10g and Form version 5.0 but unable to connect. Does Oracle 10g database supports form 4.5
What is auto accounting what are the steps for setting up auto accounting? : oracle accounts receivable
Where in the Oracle directory tree structure are audit traces placed?
types of receipts and detail desription about recipts and tables effected by receipts?
Give the stages of instance startup to a usable state where normal users may access it.
Differentiate between earned discounts and unearned discounts? : oracle accounts receivable
hi iam kavya, i completed Oracle11i(finance module), i do not know how to face the interview questions please adivese me
What is the Symbol use for Inner Join
as a technical developer in oracle applications which type errors feced in your experience sofar
What view would you use to determine free space in a tablespace?
what are important reports in HRMS,GL,AP,AR in oracle apps?
3 Answers IBM, Pathway Technologies, Satyam, Techtimer, Wipro,
What is auto invoicing? Explain : oracle accounts receivable