A key is a set of columns or expressions on which you can build an index.
kubernetes containarization training courses malaysia
Although the terms are often used interchangeably, indexes and keys are different. Indexes are structures stored in the database that users manage using SQL statements. Keys are strictly a logical concept.
cloud computing training courses malaysia
The following statement creates an index on the customer_id column of the sample table oe.orders:
CopyCREATE INDEX ord_customer_ix ON orders (customer_id);
In the preceding statement, the customer_id column is the index key. The index itself is named ord_customer_ix.
Note
Primary and unique keys automatically have indexes, but you might want to create an index on a foreign key.
ai artificial intelligence training courses malaysia
See also
- “Data Integrity”
- Oracle Database SQL Language Reference
CREATE INDEXsyntax and semantics
Leave a Reply