Perbedaan Delete, Truncate, dan Drop di phpMyadmin

1. DELETE

Basically, it's a Data Manipulation Language (DML) command. Used to delete one or
more tuples than a table. With the help of "DELETE" command we can delete all lines at once or
delete rows one by one. that is, we can use it according to terms or conditions
using the Where clause. It is relatively slower than the TRUNCATE command.

SYNTAX:
If we want to delete all table rows:
DELETE from ;
SYNTAX:
If we want to delete the table row according to the condition then we use the WHERE clause,
DELETE from WHERE ;
Notes:
Here we can use the “ROLLBACK” command to return a tuple.

2. DROP

This is a Data Definition Language (DDL) command. It is used to drop the entire table. With
the help of the "DROP" command we can drop (delete) the entire structure at once, i.e. remove elements
named schema. By using this command the existence of the entire table is completed or it is said to be missing.

SYNTAX
If we want to drop the table.
DROP table ;
Notes:
Here we cannot restore the table by using the “ROLLBACK” command.

3. TRUNCATE

It is also a Data Definition Language (DDL) command. It is used to delete all relation rows
(table) at once. With the help of "TRUNCATE" command we cannot delete a single line because here
WHERE clause is not used. By using this command the existence of all table rows is lost. It's relative
faster than delete command because it deletes all lines fast.

SYNTAX

If we want to use truncate :

TRUNCATE ;

Notes:

Here we cannot return table tuples by using “ROLLBACK” command.

Was this answer helpful?

Artiel Terkait

Apa itu Softaculous Installer yang ada di cPanel?

Jika Anda sudah lama bergelut dengan dunia website dan web hosting, pastinya Anda pernah...

Apa perbedaan Cpanel dengan Client Area

Ada perbedaan yang signifikan antara cPanel dan Client Area. Untuk menghindari kesalahpahaman,...

Bagaimana cara membuat Full Backup di Cpanel

Sebelum anda melakukan full backup pada hosting account anda, pastikan disk space hosting...

Bagaimana cara mengganti bahasa cPanel ke bahasa Indonesia

Mungkin Anda sudah mulai bosan dengan bahasa Inggris di cPanel Anda dan Anda ingin menggantinya...

Bagaimana cara Redirect Domain melalui cPanel

Berikut ini cara redirect domain ke website lain melalui cPanel yang bisa Anda coba. 1. Login ke...