SQL Server Create and Drop Index on table

We have gone through the blogs to understand the Creation of Tables , Constraints to be applied, data to be inserted but it is also important to understand how the data retrieval will happen when you have thousands of lakhs of records in the table.

For that we should ensure that the data retrieval should be fast and thus INDEX comes into picture.

INDEXES are the tables columns combined together to let the table use them to fetch the data faster.

CREATE INDEX index_name
ON table_name (column1, column2, ...); 

The below given syntax removes the duplicate values

CREATE UNIQUE INDEX index_name
ON table_name (column1, column2, ...); 

Let take example of table – oracleappshelpUsers and create Index on the table

 CREATE INDEX indx_uname
 ON oracleappshelpUsers (FamilyName, GivenName);  

The SQL Query should be like

DROP INDEX oracleappshelpUsers.indx_uname;