Friday, November 28, 2008

difference between delete and drop sql command

Q. What is the difference between delete and drop sql command?

Ans: - Delete command in SQL is used to remove either all the rows or tuples from table or a set of rows from the table but schema or relation remains there. We can roll back the DELETE TABLE statement.

 But drop command deletes all the tuples as well as the schema or structure of the table. When a table is dropped no tuples can be inserted into table unless it is re-created with the create table command. We cannot roll back the DROP TABLE statement.

 

No comments: