How can multiple indexes be created in Oracle?

In Oracle database, you can create multiple indexes using the CREATE INDEX statement. The syntax is as follows:

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

Among them, `index_name` is the name of the index, `table_name` is the name of the table, and `(column1, column2, …)` are the columns on which the index is to be created. For example, to create an index named `name_idx` on the `first_name` and `last_name` columns of the `employees` table, you can use the following statement:

CREATE INDEX name_idx
ON employees (first_name, last_name);

Multiple indexes can be created on the same table as needed by using different index names and column combinations.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds