1.

Which command allows the removal of all rows from a table but flushes a table more efficiently since no rollback information is retained:(a) TRUNCATE command(b) Create command(c) Drop table command(d) Alter table commandThe question was posed to me during an online interview.The origin of the question is DDL Command in section SQL Basics of Oracle

Answer» <html><body><p>Right choice is (a) TRUNCATE command<br/><br/>Easy explanation: The <a href="https://interviewquestions.tuteehub.com/tag/sql-4621" style="font-weight:bold;" target="_blank" title="Click to know more about SQL">SQL</a> TRUNCATE TABLE command is <a href="https://interviewquestions.tuteehub.com/tag/used-2318798" style="font-weight:bold;" target="_blank" title="Click to know more about USED">USED</a> to delete complete data from an <a href="https://interviewquestions.tuteehub.com/tag/existing-979526" style="font-weight:bold;" target="_blank" title="Click to know more about EXISTING">EXISTING</a> table.You can <a href="https://interviewquestions.tuteehub.com/tag/also-373387" style="font-weight:bold;" target="_blank" title="Click to know more about ALSO">ALSO</a> use DROP TABLE command to delete complete table but it would remove complete table structure form the database and you would need to re-create this table once again if you <a href="https://interviewquestions.tuteehub.com/tag/wish-1457925" style="font-weight:bold;" target="_blank" title="Click to know more about WISH">WISH</a> you store some data.</p></body></html>


Discussion

No Comment Found

Related InterviewSolutions