CodesJava

Easy learning with example program codes

Difference between TRUNCATE, DELETE and DROP commands?


The DELETE statement is used to delete or remove all the rows from the table. We can use where clause to delete some specific rows. We can roll back the DELETE operation. DELETE is slower than TRUCATE. It is a DML command. Table structure will not be lost.

The TRUNCATE statement is used to remove the all rows from an existing table. We can’t roll back the TRUNCATE operation. TRUCATE is faster than DELETE. It is a DDL command. Table structure will not be lost.

The DROP TABLE statement is used to delete an existing table definition, indexes, constraints, access privileges and all associated data. We can’t roll back the DROP operation. It is DDL command. Table structure will be lost.

Related topics

Posted in SQL   
Sign Up/ Sign In
Ask a Question


Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at hr@codesjava.com.

Development

We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on hr@codesjava.com.

Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki