TRUNCATE
is a DDL
command, and DELETE
is a DML
command.TRUNCATE QLbut
you can use it with DELETE
command.TRUNCATE
cannot be used with indexed views, whereas DELETE
can be used with indexed views.DELETE
command is used to delete data from a table. It only deletes the rows of data from the table while truncate is a very dangerous command and should be used carefully because it deletes every row permanently from a table.