Truncate vs Delete vs Drop in SQL Simplified in Under a Minute | Database #shorts

preview_player
Показать описание
SQL Commands: Truncate vs Delete vs Drop
What’s the difference? While the commands have similar functions, there are significant differences. Differences simplified in under a minute!

TRUNCATE is similar to DELETE, but this operation is a DDL (Data Definition Language) command. It also deletes records from a table without removing table structure, but it doesn’t use the WHERE clause.

SQL DELETE query deletes all records from a database table. To execute a DELETE query, delete permissions are required on the target table. If you need to use a WHERE clause in a DELETE, select permissions are required as well.

The Drop command in SQL is a part of the Data Definition Language command (DDL command).

DROP Command removes the definition of the table, all the data, indexes, triggers, constraints, and permission specifications of that table.

In SQL Drop command is used to delete the existing table. Drop Command drops the whole table from the existing Relational Database Management System (RDBMS).

#truncate #delete #drop #sql #database #dbms #rdbms #SCALER
Рекомендации по теме
Комментарии
Автор

What other comparisons do you want to see? Comment below! 👇🏻

SCALER
Автор

U missed important point … half knowlege is dangerous….. wat os the main diff between delete and trucate… just google if you dont know.. forget about where clause

venkim