SlideShare a Scribd company logo
Indexes: 
Index is used for faster access of data from table and will show records in the table in ascending 
order or descending order. Index in SQLSERVER will works automaticall.there is no need to open or 
to close and index. 
Types of indexes: 
1. Clustered index 
2. non-clustered index 
Clustered index: 
1. A table can contain only one clustered index. If table contains primary key column then on that 
column clustered index will work. 
2. This index will change the physical order of records in the table based on indexed column. 
Non-clustered index: 
1. A table can contain 249 non-clustered indexes. 
2. If table contains uni-constraints then on that column non clustered index will work.it will not 
change the physical order of records in the table but with the help of reference (book index & index 
key) of the table. 
3. it will show the records in ascending or descending order. 
SYNTAX: 
CREATE[UNIQUE][CLUSTERED/NON-CLUSTERED] 
INDEX<INDEX_NAME> 
ON<TABLE_NAME>(<COLUMN_NAME>[DESC]) 
TO DELETE INDEX: 
DROP INDEX<TABLE_NAME><INDEX_NAME> 
CLUSTERED INDEX: 
CREATE CLUSTEREDINDEX MYINDEX1 
ON EMPLOYEE(ENO) 
SELECT * FROM EMPLOYEE 
(ENO WILL BE IN ASCENDING ORDER)
DROP INDEX EMPLOYEE.MYINDEX1 
SELECT * FROM EMPLOYEE 
(ENO WILL BE IN ASCENDING ORDER) 
NON-CLUSTERED INDEX: 
CREATE NONCLUSTEREDINDEX MYINDEX2 
ON EMPLIST (ENO) 
INCLUDE(ENAME,SAL) 
SELECT * FROM EMPLIST 
(ENO WILL BE IN ASCENDING ORDER) 
DROP INDEX EMPLIST.MYINDEX2 
SELECTR * FROM EMPLIST 
(ENO WILL BE IN PREVIOUS ORDER) 
MULTIPLE NONCLUSTERED INDEX: 
CREATE NONCLUSTEREDINDEX MYINDEX3 
ON EMPLOYEE(ENO) 
INCLUDE(ENAME,SAL) 
CREATE NONCLUSTEREDINDEX MYINDEX4 
ON EMPLOYEE(SAL) 
INCLUDE(ENAME,SAL) 
SELECT * FROM EMPLOYEE WHERE ENO>100 
SELECT * FROM EMPLOYEE WHERE SAL>1000 
NOTE: 
If The Table Contains Multiple Nonclustered Indexes Then Two Conditions Should Be Satisfied 
1. Select Statement With Where Clause 
2. Indexed Column In Where Clause

More Related Content

What's hot

SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables  SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables
Vibrant Technologies & Computers
 
CS 542 Database Index Structures
CS 542 Database Index StructuresCS 542 Database Index Structures
CS 542 Database Index StructuresJ Singh
 
Creating, altering and dropping tables
Creating, altering and dropping tablesCreating, altering and dropping tables
Creating, altering and dropping tablespunu_82
 
V15 like operator-c
V15 like operator-cV15 like operator-c
V15 like operator-c
Dhirendra Chauhan
 
Sql Keywords - You Need to Use
Sql Keywords - You Need to UseSql Keywords - You Need to Use
Sql Keywords - You Need to Use
Amrit Tiwari
 
Oracle sql joins
Oracle sql joinsOracle sql joins
Oracle sql joins
redro
 
VLOOKUP Function - Marelen Talavera - Vivacious Analytic
VLOOKUP Function - Marelen Talavera - Vivacious AnalyticVLOOKUP Function - Marelen Talavera - Vivacious Analytic
VLOOKUP Function - Marelen Talavera - Vivacious Analytic
Maria Elena Acdol-Talavera
 
Vlookup - an introduction
Vlookup - an introductionVlookup - an introduction
Vlookup - an introduction
vvmenon22
 
PHP mysql Mysql joins
PHP mysql  Mysql joinsPHP mysql  Mysql joins
PHP mysql Mysql joins
Mudasir Syed
 
Sql select statement
Sql select statementSql select statement
Sql select statementVivek Singh
 
MySQL JOINS
MySQL JOINSMySQL JOINS
Filter
FilterFilter
Web app development_my_sql_09
Web app development_my_sql_09Web app development_my_sql_09
Web app development_my_sql_09Hassen Poreya
 
Guide To Mastering The MySQL Query Execution Plan
Guide To Mastering The MySQL Query Execution PlanGuide To Mastering The MySQL Query Execution Plan
Guide To Mastering The MySQL Query Execution Plan
Optimiz DBA
 
How to use Hlookup find an exact match
How to use Hlookup find an exact match How to use Hlookup find an exact match
How to use Hlookup find an exact match
Excel Advise
 

What's hot (18)

Formulas Cheat Sheet
Formulas Cheat SheetFormulas Cheat Sheet
Formulas Cheat Sheet
 
SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables  SQL Introduction to displaying data from multiple tables
SQL Introduction to displaying data from multiple tables
 
CS 542 Database Index Structures
CS 542 Database Index StructuresCS 542 Database Index Structures
CS 542 Database Index Structures
 
Creating, altering and dropping tables
Creating, altering and dropping tablesCreating, altering and dropping tables
Creating, altering and dropping tables
 
V15 like operator-c
V15 like operator-cV15 like operator-c
V15 like operator-c
 
Sql Keywords - You Need to Use
Sql Keywords - You Need to UseSql Keywords - You Need to Use
Sql Keywords - You Need to Use
 
Oracle sql joins
Oracle sql joinsOracle sql joins
Oracle sql joins
 
VLOOKUP Function - Marelen Talavera - Vivacious Analytic
VLOOKUP Function - Marelen Talavera - Vivacious AnalyticVLOOKUP Function - Marelen Talavera - Vivacious Analytic
VLOOKUP Function - Marelen Talavera - Vivacious Analytic
 
Vlookup - an introduction
Vlookup - an introductionVlookup - an introduction
Vlookup - an introduction
 
Mysql joins
Mysql joinsMysql joins
Mysql joins
 
PHP mysql Mysql joins
PHP mysql  Mysql joinsPHP mysql  Mysql joins
PHP mysql Mysql joins
 
Sql select statement
Sql select statementSql select statement
Sql select statement
 
Hira
HiraHira
Hira
 
MySQL JOINS
MySQL JOINSMySQL JOINS
MySQL JOINS
 
Filter
FilterFilter
Filter
 
Web app development_my_sql_09
Web app development_my_sql_09Web app development_my_sql_09
Web app development_my_sql_09
 
Guide To Mastering The MySQL Query Execution Plan
Guide To Mastering The MySQL Query Execution PlanGuide To Mastering The MySQL Query Execution Plan
Guide To Mastering The MySQL Query Execution Plan
 
How to use Hlookup find an exact match
How to use Hlookup find an exact match How to use Hlookup find an exact match
How to use Hlookup find an exact match
 

Similar to Indexes

Database index
Database indexDatabase index
Database index
Riteshkiit
 
Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)
Ehtisham Ali
 
SQL | DML
SQL | DMLSQL | DML
SQL | DML
To Sum It Up
 
MySQL INDEXES
MySQL INDEXESMySQL INDEXES
MySQL INDEXES
HripsimeGhaltaghchya
 
Index in sql server
Index in sql serverIndex in sql server
Index in sql server
Durgaprasad Yadav
 
Sql basics
Sql basicsSql basics
Sql basics
Aman Lalpuria
 
Sql overview-1232931296681161-1
Sql overview-1232931296681161-1Sql overview-1232931296681161-1
Sql overview-1232931296681161-1sagaroceanic11
 
MSSQL_Book.pdf
MSSQL_Book.pdfMSSQL_Book.pdf
MSSQL_Book.pdf
DubsmashTamizhan
 
Oracle Index
Oracle IndexOracle Index
Oracle Index
Madhavendra Dutt
 
Sql introduction
Sql introductionSql introduction
Sql introduction
Bhavya Chawla
 
SQL
SQLSQL
Sql server lesson6
Sql server lesson6Sql server lesson6
Sql server lesson6
Ala Qunaibi
 
SQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfSQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdf
DraguClaudiu
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007paulguerin
 

Similar to Indexes (20)

Database index
Database indexDatabase index
Database index
 
Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)
 
Sql index
Sql indexSql index
Sql index
 
SQL | DML
SQL | DMLSQL | DML
SQL | DML
 
MySQL INDEXES
MySQL INDEXESMySQL INDEXES
MySQL INDEXES
 
Index in sql server
Index in sql serverIndex in sql server
Index in sql server
 
Sql basics
Sql basicsSql basics
Sql basics
 
Module08
Module08Module08
Module08
 
Module08
Module08Module08
Module08
 
Sql overview-1232931296681161-1
Sql overview-1232931296681161-1Sql overview-1232931296681161-1
Sql overview-1232931296681161-1
 
MSSQL_Book.pdf
MSSQL_Book.pdfMSSQL_Book.pdf
MSSQL_Book.pdf
 
Oracle Index
Oracle IndexOracle Index
Oracle Index
 
Mysql cheatsheet
Mysql cheatsheetMysql cheatsheet
Mysql cheatsheet
 
Sql introduction
Sql introductionSql introduction
Sql introduction
 
SQL
SQLSQL
SQL
 
Sql server lesson6
Sql server lesson6Sql server lesson6
Sql server lesson6
 
Sql slid
Sql slidSql slid
Sql slid
 
SQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfSQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdf
 
V25 sql index
V25 sql indexV25 sql index
V25 sql index
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
 

More from Yaswanth Babu Gummadivelli

E commerce use case documentation.
E commerce use case documentation.E commerce use case documentation.
E commerce use case documentation.
Yaswanth Babu Gummadivelli
 
MOM on activity diagram
MOM on activity diagramMOM on activity diagram
MOM on activity diagram
Yaswanth Babu Gummadivelli
 
UML Diagrams
UML DiagramsUML Diagrams
Business analyst ppt
Business analyst pptBusiness analyst ppt
Business analyst ppt
Yaswanth Babu Gummadivelli
 
MOM on BA
MOM on BAMOM on BA
exception handling
 exception handling exception handling
exception handling
Yaswanth Babu Gummadivelli
 
collections
 collections collections
Constructors
Constructors Constructors
array
array array
Use case for atm
Use case for atmUse case for atm
Use case for atm
Yaswanth Babu Gummadivelli
 
use case diagramHospital managment system
use case diagramHospital managment systemuse case diagramHospital managment system
use case diagramHospital managment system
Yaswanth Babu Gummadivelli
 
Activity diagram for ticket vending machine
Activity diagram for ticket vending machineActivity diagram for ticket vending machine
Activity diagram for ticket vending machine
Yaswanth Babu Gummadivelli
 
Extreme programming
Extreme programmingExtreme programming
Extreme programming
Yaswanth Babu Gummadivelli
 
Agile model
Agile model Agile model
Business Analyst
Business AnalystBusiness Analyst
Business Analyst
Yaswanth Babu Gummadivelli
 

More from Yaswanth Babu Gummadivelli (20)

Presentation on BA
Presentation on BAPresentation on BA
Presentation on BA
 
ERP
ERPERP
ERP
 
Ba -content
Ba -contentBa -content
Ba -content
 
E commerce use case documentation.
E commerce use case documentation.E commerce use case documentation.
E commerce use case documentation.
 
MOM on activity diagram
MOM on activity diagramMOM on activity diagram
MOM on activity diagram
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Business analyst ppt
Business analyst pptBusiness analyst ppt
Business analyst ppt
 
MOM on BA
MOM on BAMOM on BA
MOM on BA
 
exception handling
 exception handling exception handling
exception handling
 
collections
 collections collections
collections
 
Constructors
Constructors Constructors
Constructors
 
array
array array
array
 
Use case for atm
Use case for atmUse case for atm
Use case for atm
 
use case diagramHospital managment system
use case diagramHospital managment systemuse case diagramHospital managment system
use case diagramHospital managment system
 
Activity diagram for ticket vending machine
Activity diagram for ticket vending machineActivity diagram for ticket vending machine
Activity diagram for ticket vending machine
 
Extreme programming
Extreme programmingExtreme programming
Extreme programming
 
Agile model
Agile model Agile model
Agile model
 
Business Analyst
Business AnalystBusiness Analyst
Business Analyst
 
CRM and ERP
CRM and ERPCRM and ERP
CRM and ERP
 
Reflection
ReflectionReflection
Reflection
 

Recently uploaded

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 

Recently uploaded (20)

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 

Indexes

  • 1. Indexes: Index is used for faster access of data from table and will show records in the table in ascending order or descending order. Index in SQLSERVER will works automaticall.there is no need to open or to close and index. Types of indexes: 1. Clustered index 2. non-clustered index Clustered index: 1. A table can contain only one clustered index. If table contains primary key column then on that column clustered index will work. 2. This index will change the physical order of records in the table based on indexed column. Non-clustered index: 1. A table can contain 249 non-clustered indexes. 2. If table contains uni-constraints then on that column non clustered index will work.it will not change the physical order of records in the table but with the help of reference (book index & index key) of the table. 3. it will show the records in ascending or descending order. SYNTAX: CREATE[UNIQUE][CLUSTERED/NON-CLUSTERED] INDEX<INDEX_NAME> ON<TABLE_NAME>(<COLUMN_NAME>[DESC]) TO DELETE INDEX: DROP INDEX<TABLE_NAME><INDEX_NAME> CLUSTERED INDEX: CREATE CLUSTEREDINDEX MYINDEX1 ON EMPLOYEE(ENO) SELECT * FROM EMPLOYEE (ENO WILL BE IN ASCENDING ORDER)
  • 2. DROP INDEX EMPLOYEE.MYINDEX1 SELECT * FROM EMPLOYEE (ENO WILL BE IN ASCENDING ORDER) NON-CLUSTERED INDEX: CREATE NONCLUSTEREDINDEX MYINDEX2 ON EMPLIST (ENO) INCLUDE(ENAME,SAL) SELECT * FROM EMPLIST (ENO WILL BE IN ASCENDING ORDER) DROP INDEX EMPLIST.MYINDEX2 SELECTR * FROM EMPLIST (ENO WILL BE IN PREVIOUS ORDER) MULTIPLE NONCLUSTERED INDEX: CREATE NONCLUSTEREDINDEX MYINDEX3 ON EMPLOYEE(ENO) INCLUDE(ENAME,SAL) CREATE NONCLUSTEREDINDEX MYINDEX4 ON EMPLOYEE(SAL) INCLUDE(ENAME,SAL) SELECT * FROM EMPLOYEE WHERE ENO>100 SELECT * FROM EMPLOYEE WHERE SAL>1000 NOTE: If The Table Contains Multiple Nonclustered Indexes Then Two Conditions Should Be Satisfied 1. Select Statement With Where Clause 2. Indexed Column In Where Clause