Answers

Question and Answer:

  Home  SQL Server Indexes

⟩ Write down the syntax and an example for create, rename and delete index?

Create Index:

CREATE INDEX index_name ON table_name (col_1,col_2..);

Example:

Create index index_sample ON employee(emp_id)

Rename Index:

ALTER INDEX index_name RENAME to new_index_name ;

Example:

ALTER INDEX index_sample RENAME to new_sample

Delete index:

drop index [schema.]index [force];

Example:

Drop index new_sample

 145 views

More Questions for you: