Apache Derby: Derby Indexes Cheat Sheet

Creating an Index

CTREATE INDEX index_name on table_name (column_name);

Creating a Unique Index

CREATE UNIQUE INDEX index_name on table_name (column_name);

Creating a Composite Index

CREATE INDEX index_name on table_name (column_name1, column_name2);

Displaying the Indexes

SHOW INDEXES FROM table_name;

Dropping Indexes

DROP INDEX index_name;

Leave a Reply

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