Difference between Delete, Truncate and Drop command in SQL

Difference between Delete, Truncate and Drop command in SQL - Hello friends U-See, In the article you read in this time with the title Difference between Delete, Truncate and Drop command in SQL, We have prepared this article well for you to read and take the information in it. Hopefully the contents of the post Artikel SQL, Which we write you can understand. Okay, happy reading.

Title: Difference between Delete, Truncate and Drop command in SQL
link : Difference between Delete, Truncate and Drop command in SQL

Read also


Difference between Delete, Truncate and Drop command in SQL

In this tutorial, we have given simple difference between delete, truncate and drop command in SQL language.

Delete: if we use delete command in a query than it simply deletes all data in a table not structure of the table.

SQL> delete table_name;

and all data can recover using rollback command.

SQL> rollback;

Truncate: if we use truncate command in a query than it deletes all data permanently and not structure of the table.

SQL> truncate table table_name;

and data can not recover using rollback command.

Another difference between delete and truncate command: if we are using auto increment variable in a table and we run delete command,after delete command if we insert any row than it simply increments the value of auto increment variable but in truncate command it starts value from one.


Drop: if we use drop command in a query than it deletes all data and structure of the table.

SQL> drop table table_name;



That's Difference between Delete, Truncate and Drop command in SQL

That's an article Difference between Delete, Truncate and Drop command in SQL This time, hopefully can benefit for you all. Well, see you in other article postings.

You are now reading the article Difference between Delete, Truncate and Drop command in SQL With link address https://u-see1.blogspot.com/2017/06/difference-between-delete-truncate-and.html

Postingan terkait:

Belum ada tanggapan untuk "Difference between Delete, Truncate and Drop command in SQL"

Post a Comment