I am learning database language. I want to know difference between delete table & truncate table? Any idea would be appreciated. Thanks in advanced.
I am learning database language. I want to know difference between delete table & truncate table? Any idea would be appreciated. Thanks in advanced.
The Difference between TRUNCATE and DELETE commands.
TRUNCATE
1. Once you use TRUNCATE command then u cannot recover the data again from the table.
2. TRUNCATE removes all the rows from the Table.
3. You cannot use WHERE clause
For Example:
TRUNCATE FROM [TABLE_NAME]; removes all the rows from the Table.
DELETE
1. If you use DELETE Command then the data deleted can be recover when you ROLLBACK.
2. You can delete selected number of records from table using DELETE command.
3. You can use WHERE clause
For Example:
DELETE FROM [TABLE_NAME]; deletes all the records from the table.
Bookmarks