๐ Day 7 โ Data Analyst Most Asked Interview Question โ
DELETE vs TRUNCATE vs DROP (SQL)
โโโโโโโโโโโโโโ
DELETE
โข Removes specific rows using WHERE
โข Can be rolled back (transactional)
โข Table structure remains
โข Slower for large data
TRUNCATE
โข Removes all rows at once
โข Cannot be rolled back
โข Table structure remains
โข Faster than DELETE
DROP
โข Removes entire table
โข Deletes data + structure
โข Cannot be rolled back
โข Frees storage completely
โโโโโโโโโโโโโโ
Rule:
๐ Remove specific data โ DELETE
๐ Clear entire table fast โ TRUNCATE
๐ Remove table completely โ DROP โ
โโโโโโโโโโโโโโ
โค๏ธ React โค๏ธ if you want interview prep Day 8 Tomorrow ๐ฅ
Post #1968
2.04K
- โค 7