Database Knowledge - CS Study Hub

Latest

Sunday, August 31, 2025

Database Knowledge



  1. What is the difference between Delete, Truncate and Drop commands?

This is the sample query for Delete, Truncate and Drop Commands:

DELETE FROM Employees WHERE Emp_Id = 7; [In delete we can use Where clause]

TRUNCATE TABLE Employees;

DROP TABLE Employees;

DELETE

TRUNCATE

DROP

It is a DML Command

It is a DDL Command

It is a DDL Command

It is used to delete rows from the table based on Where Condition

It is used to delete all rows from the table

It is used to delete rows from the table

It will not delete schema

It will not delete schema

It will delete schema

It can be rollback

It cannot be rollback

It can not be rollback


No comments:

Post a Comment