What is the difference between TRUNCATE and DROP statements?
What is the difference between TRUNCATE and DROP statements?
36422-Sep-2021
Updated on 22-Sep-2021
Home / DeveloperSection / Forums / What is the difference between TRUNCATE and DROP statements?
Ashutosh Kumar Verma
24-Sep-2021Different between TRUNCATE and DROP command:
SQL TRUNCATE Command:
SQL Truncate command is used to permanently delete only records from a database table. to deleted records by using of truncate command can not be recovered or rollback because it is not stored in cache of the system.
The following SQL statement is delete records from above table using of Truncate command.
SQL DROP Command:
The SQL DROP command is used to delete whole table with records or used to delete a database.
The following SQL statement used to drop the table 'TeacherDetails'
To drop the database you should use the following SQL command