Pergunta de entrevista da empresa Jio

difference between delete and truncate ? basic database questions

Respostas da entrevista

Sigiloso

18 de dez. de 2017

delete:delete row or table but can not free up space.dml command.rolled back. trucate:delete table and also free up the space.ddl command..not rolled back.

Sigiloso

24 de dez. de 2017

Delete command will delete whole data from the table and table as well,after that there is no existence of table (table is deleted permanently ). Truncate command will delete the data in the table but the structure of the table will remain,at any point of time we can use that structure.(structure of table will remain in the memory).used in testing purpose.