Saturday, February 28, 2015

TRUNCATE TABLE EMP;,DELETE FROM EMP;, Will the outputs of the above two commands?

Question:TRUNCATE TABLE EMP;,DELETE FROM EMP;, Will the outputs of the above two commands??

Answer: </P><P>Both will result in deleting all the rows in the table EMP.</P><P><br><b>Answered by Scott on 2005-05-12 10:31:58:</b> The difference is that the TRUNCATE call cannot be rolled back and all memory space for that table is released back to the server. TRUNCATE is much faster than DELETE and in both cases only the table data is removed, not the table structure.

Tags:Interview Questions, Database, SQL,

Please submit your Interview Answer for the above Question via replying to this post. Thank you for visiting to our blog, Have a Good Day!.



Sponsor Advertisement



Human Resource Management Software

Human Resource Management Software

Powerful, configurable software for human resources management that is easy to manage and remarkably cost-effective, whatever the size of your company. Now there’s a smarter, more efficient way to handle all of your people-related activities. Easy-to-use system manages the full hire-to-retire lifecycle...

No comments:

Post a Comment