What is the difference between DELETE and TRUNCATE?
Answers were Sorted based on User's Feedback
Answer / shilpa
Delete command delets one row or whole table with table
defination but truncate command only delete table not table
defination
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / debi
1.when we use delete command then the records from the
table is not deleted permanently so that when we further
use rollback command the records are again available in the
table but in case of truncate the data is permenently
deleted from the table.
2.in case of truncate data deletion is faster as compared
to delete
3.
we can't use ant where condition in case if truncate
Is This Answer Correct ? | 2 Yes | 2 No |
Delete command will remove the data values ( all the
records of table) and space and table structure will be
ramain. We cannot free the space and remove the table
structure using Delete command.
Truncate command will free the memory and removes table
structure from data dictionary.
ramumcato@yahoo.com
Is This Answer Correct ? | 9 Yes | 11 No |
Answer / sanjay keserwani
we can go upto some number of records through delete while
in truncate we have to unoccupied all records.
Is This Answer Correct ? | 4 Yes | 7 No |
Answer / amol
Be very careful when deleting records. You cannot undo this
statement! but in mysql...
Is This Answer Correct ? | 0 Yes | 5 No |
wht is the difference between truncat,drop in sqlserver wht is the difference between function and stored procedure
Why indexing is needed?
Is mariadb a nosql database?
Are subqueries faster than joins?
What are different methods to trace the pl/sql code?
what is the difference between a having clause and a where clause? : Sql dba
what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?
How do I save a sql query?
how to show all tables with 'mysql'? : Sql dba
Do we need to create index on primary key?
Differentiate between sga and pga.
How to get each name only once from an employee table?