0 votes
in Sql by

What is the difference between DELETE and TRUNCATE?

1 Answer

0 votes
by

The differences are:

The basic difference in both is DELETE command is DML command and the TRUNCATE command is DDL.

DELETE command is used to delete a specific row from the table whereas the TRUNCATE command is used to remove all rows from the table.

We can use the DELETE command with WHERE clause but cannot use the TRUNCATE command with it.

Related questions

0 votes
asked Jun 15, 2023 in Sql by Robin
0 votes
asked Dec 15, 2020 in Sql by SakshiSharma
...