---
title: "What are an Index in SQL Server and all developer use indexing in the database?"  
description: "What are an Index in SQL Server and all developer use indexing in the database?"  
author: "Ravi Vishwakarma"  
published: 2021-09-22  
updated: 2021-09-22  
canonical: https://www.mindstick.com/forum/156743/what-are-an-index-in-sql-server-and-all-developer-use-indexing-in-the-database  
category: "database"  
tags: ["database", "mysql", "sql server", "sql"]  
reading_time: 2 minutes  

---

# What are an Index in SQL Server and all developer use indexing in the database?

What are an [Index](https://www.mindstick.com/blog/198/index-in-sql-server) in [SQL Server](https://www.mindstick.com/articles/12999/what-is-table-valued-function-in-sql-server) and all [developer](https://www.mindstick.com/articles/157260/variation-between-web-designer-and-web-developer) use [indexing](https://www.mindstick.com/blog/303693/how-search-engines-work-crawling-indexing-and-ranking) in the [database](https://www.mindstick.com/articles/12226/use-of-database-in-sencha-extjs-and-insert-record-from-user-form-using-ajax)?

## Replies

### Reply by Ashutosh Kumar Verma

## [SQL](https://www.mindstick.com/articles/13115/types-of-keys-in-sql-or-oracle-database) INDEX:

SQL Create Index statement is used to create Indexes in database table. Indexes are used to retrieve data from database table more quickly than other ways. The user can not see indexes they just used it to speedup searches/queries.

Updating a table with indexes take more time than update table without indexes because indexes also need to update, so index only created on column that will be searches frequently.

There are also duplicated values are allowed in the index.

## Syntax for Create Index-

```
CREATE INDEX index_name
ON table_name(column1, column2,…);
```

## Create Unique Index:

When create unique index on a table it does not allowed duplicate values.

## Syntax-

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

## Example:

Lets take a database table ‘Student’

![What are an Index in SQL Server and all developer use indexing in the database?](https://www.mindstick.com/mindstickforums/4bdf7527-3b1c-49b9-8320-6f088ffe7dfb/images/0267aefc-3478-4224-b70e-928c0aea1c1f.png)\

Now, create an Syntax on above table like as,

```
create index indexStudent
ON Student (stuName);
```

To create index on multiple column in a table the following SQL statement is used. It created on other database table ‘StudentRecord;.

```
create index indexStudent
ON StudentRecord (stuName, stuCourse);
```

## DELETE Index:

```
DROP INDEX table_name.index_name;
```

## Example:

```
drop index Student.indexStudent;
```

\


---

Original Source: https://www.mindstick.com/forum/156743/what-are-an-index-in-sql-server-and-all-developer-use-indexing-in-the-database

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
