Interviews - C# Corner

Marcus
Difference between Delete and Truncate?
By Marcus in SQL Server on Jul 05, 2011
  • Shankar M
    Dec, 2012 13

    Delete and Truncate does the job of removing the rows from the Table. The difference lies in the fact that, When we issue a delete command we can rollback the statement issued, where as in Truncate rollback cannot be issued.

    • 0
  • vidya bollineni
    Aug, 2011 16

    <P>Delete: By using Delete we can delete particular rows..through Where condition</P> <P>eg.&nbsp; delete from emp where age=10</P> <P>Drop: if we want to delete the whole table...i.e...table structure,attributes,indexes..every thing we use drop</P> <P>eg. drop table emp</P> <P>Truncate:if we only want to get rid of the data inside the table and not the table itself we use truncate</P> <P>eg.truncate table emp</P>

    • 0
  • RMS
    Jul, 2011 23

    DELETE Statement: This command deletes only the rows from the table based on the condition given in the where clause or deletes all the rows from the table if no condition is specified. But it does not free the space containing the table. <P>TRUNCATE statement<STRONG>:</STRONG> This command is used to delete all the rows from the table and free the space containing the table.</P>

    • 0
  • nagabhushan Hiremath
    Jul, 2011 6

    <P>Delete : Delete is DML Command it mean once you delete the containts from table you can revert back.</P> <P>Truncate: it is DDL command it mean once you delete the containts from the table you can't roll back.</P>

    • 0

Cloud & IoT DevCon16

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS