Tell me when are we going to use truncate and delete?
Submitted by: MuhammadTRUNCATE is a DDL command, whereas DELETE is a DML command.
We can't execute a trigger in case of TRUNCATE whilst with DELETE, we can accomplish a trigger.
TRUNCATE is quicker than DELETE, for the reason that when we use DELETE to delete the data, at that time it store the whole statistics in the rollback gap on or after where we can get the data back after removal. In case of TRUNCATE, it will not store data in rollback gap and will unswervingly rub it out. TRUNCATE do not recover the deleted data.
We can use any condition in WHERE clause using DELETE but it is not possible with TRUNCATE.5.If a table is referenced by any foreign key constraints, then TRUNCATE won't work.
Submitted by: Muhammad
We can't execute a trigger in case of TRUNCATE whilst with DELETE, we can accomplish a trigger.
TRUNCATE is quicker than DELETE, for the reason that when we use DELETE to delete the data, at that time it store the whole statistics in the rollback gap on or after where we can get the data back after removal. In case of TRUNCATE, it will not store data in rollback gap and will unswervingly rub it out. TRUNCATE do not recover the deleted data.
We can use any condition in WHERE clause using DELETE but it is not possible with TRUNCATE.5.If a table is referenced by any foreign key constraints, then TRUNCATE won't work.
Submitted by: Muhammad
Read Online Database Developer Job Interview Questions And Answers
Top Database Developer Questions
☺ | Please explain what is Database Testing? |
☺ | Explain me what are the different DDL commands in SQL? |
☺ | Tell us what is a temp table? |
☺ | Tell me what is a Composite PRIMARY KEY? |
☺ | Do you know SQL Data Types? |
Top Databases Programming Categories
☺ | RDBMS Interview Questions. |
☺ | SQL Interview Questions. |
☺ | SSRS Interview Questions. |
☺ | Database Administrator (DBA) Interview Questions. |
☺ | Sybase Interview Questions. |