Javatpoint Logo
Javatpoint Logo

DB2 RazorSQL Create Index

Create Index is used to create index for a table. An index is a set of pointers which refers to rows in a table blocks in MDC or ITC tables, XML data in an XML storage object that are logically ordered by the values of one or more keys. Indexes are used to increase the speed of querying data and to cluster and partition of the data efficiently.

An index can enhance the performance of operation on views.A table with a unique index can contains rows with unique keys.

You can create different types of indexes according to the table requirement.

Types of indexes

  • Unique and Non-Unique indexes
  • Clustered and non-clustered indexes
DB2 createindex1

Click on the create index , it will create a message like this:

DB2 createindex2

Now put an index name, select columns and then click on then generate SQL.

DB2 createindex3

Now execute the query:

DB2 createindex4

A message will be appeared on the screen for successfull completion.

You can check that created index:

DB2 createindex6

Create procedure already completed.


Next TopicDB2 Alter




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA