Ankur Jain
What is the difference between TRUNCATE and DROP?
By Ankur Jain in Databases & DBA on Aug 18 2014
  • sajidlkhan lodi
    Feb, 2015 10

    Truncate removes all records from table while Drop for delete the table from database.

    • 4
  • Shivam Shukla
    Feb, 2015 4

    TRUNCATE rapidly removes all rows from a table while maintaining the table definition. (Row by row DELETE can take time, especially for tables with lots of keys.) It comes in handy for such things as log tables that start out empty for each week's production. It has the convenient side effect of resetting the indexes and releasing unused disk storage. I have used TRUNCATE to wipe out the contents of a log table that used to contain millions of rows, to switch to an operational discipline where it only contains a weeks' worth of rows, for example.

    • 2
  • Mitesh Patel
    Dec, 2014 22

    Drop Removes a remove the structure of object and data while truncate remove the data only

    • 2
  • Tusharika T
    Dec, 2014 22

    Drop Removes a table from the database. Table structures, indexes, privileges, constraints will also be removed.. truncate Removes all rows from a table, but the table structures and its columns, constraints, indexes remains.

    • 2
  • Onkar Sharma
    May, 2021 15
  • Naresh Tottempudi
    Mar, 2018 1

    Truncate will delete only records of table but not delete structure(design). Drop will delete entire table with design

    • 1
  • Bhuban Magar
    Jan, 2017 6

    truncate removes data permanently from database,data cannot be rollback after truncate but drop removes data temporary and data can rollback.

    • 1
  • Keerthi Venkatesan
    Apr, 2016 20

    truncate delete all the values in the tables and keep the table empty but drop delete the table

    • 1
  • Ashish Srivastava
    Jan, 2016 9

    TRUNCATE removes all data from the table while retaining the table structure DROP removes the table data and structure.

    • 1
  • Pankaj  Kumar Choudhary
    Aug, 2015 28

    TRUNCATE removes all rows from a table. The operation cannot be rolled back and no triggers will be fired. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE. The DROP command removes a table from the database. All the tables' rows, indexes and privileges will also be removed. No DML triggers will be fired. The operation cannot be rolled back.

    • 1
  • Rakesh
    Jul, 2015 18

    TRUNCATE removes all rows from a table. The operation cannot be rolled back and no triggers will be fired. As such, TRUCATE is faster and doesn't use as much undo space as a DELETE. The DROP command removes a table from the database. All the tables' rows, indexes and privileges will also be removed. No DML triggers will be fired. The operation cannot be rolled back.

    • 1
  • Vijaya Sankar N
    Jun, 2015 16

    TRUNCATE removes all data but retains the table and its structure. DROP removes the table and its data from the database.

    • 1
  • Rahul Prajapat
    May, 2015 27

    TRUNCATE only remove the data from table and DROP remove data as well as table definition from database

    • 1
  • Kml Surani
    May, 2015 13

    A WHERE clause can be used to only remove some rows. TRUNCATE removes all rows from a table. The operation cannot be rolled back and no triggers will be fired. The DROP command removes a table from the database.

    • 1
  • Pankaj  Kumar Choudhary
    Mar, 2015 24

    Drop command completely Delete the table but truncate command only remove data from table..

    • 1
  • Munesh Sharma
    Feb, 2015 14

    http://dotnet-munesh.blogspot.in/2013/12/difference.html

    • 1
  • sajidlkhan lodi
    Feb, 2015 10

    Truncate removes all records from table while Drop for delete the table from database.

    • 1
  • Vikas Kumar Garg
    Jan, 2015 17

    Delete command is used to remove the particular row you want to delete from the table by using the where clause. Truncate command is used to delete all the rows from the table. Drop command is used to remove the table from the database.

    • 1
  • Akhil Garg
    Sep, 2014 14

    TRUNCATE removes all data from the table while retaining the table structure and rollback is possible, whereas DROP removes the table from the database with table structure so rollback is not possible.

    • 1
  • Mahanti Chiranjeevi
    Sep, 2014 9

    Truncate: Commit and rollback are not possible. Require very less space. No need to fire trigger. Faster execution. Its a DML command. Drop: Commit and rollback not possible. Requires NO space. Faster execution. More faster.

    • 1
  • Ankur Jain
    Aug, 2014 18

    TRUNCATE removes all data from the table while retaining the table structure, whereas DROP removes the table from the database.

    • 1
  • Nisha Regil
    Sep, 2020 8

    The DROP command is used to remove table definition and its contents. Whereas the TRUNCATE command is used to delete all the rows from the table. ... DROP is a DDL(Data Definition Language) command. Whereas the TRUNCATE is also a DDL(Data Definition Language) command.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS