Sunday, February 28, 2021

What is Index? How may type of index?

Index is the mechanism for searching data from database table. Indexes are used to find data from table quickly. Indexes are applied on table or view.


There are different type of indexes are there

1. Cluster Index

2. Non-Cluster Index

3. Unique Index

4. Filtered Index




Difference between Truncate and Delete

Truncate Delete
This is a DDL(Data Defination Language) command This is a DML(Data Manipulation Language) command
This will delete the entire table This can delete the entire table or can be rows.
Where clause is not applied Where clause can be applied
This will reset the seed value This will not reset the seed values which means identity of the column will remain same.
Performance wise is faster This is slower than Truncate
We cannot rollback the changes.We can rollback the changes.