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 client makes connection with server in client/server architecture?
A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables?
TILL WHAT LEVEL OF SECURITY BO SUPPORTS?
A scenario for amount correction & how to use amount correction functionality in AP invoices
Explain the use of setting GLOBAL_NAMES equal to TRUE.
I have 3+ Years experience HR with Technical Recruitment Industry. Now i would like to learn oracle HRMS Models of all aspect. please suggest any one, which institution is best for oracle HRMS practical with real time teaching in Chennai, Tamilnadu. What are the basic stat up to learn Oracle HRMS with Core strongly?
PURCHASE ORDER TO PAYABLES WHAT ENTREIS WILL HAVE
How do you create a credit note against an invoice? : oracle accounts receivable
if i write the procedure.. and other person make the changes in that code then where i find who is changing my procedure
Can anybody tell which is the best training institute for learning Oracle in chennai...? And i also i want placement assurance
Hi I am searching for best oracle Apps institute? Please tel me which is best institute in hyderabad I am working in developer 6i....
what is the difference b/w oracle8i and oracle9i