Using Sequences
Sequences are used to generate unique numbers across sessions and statements, including concurrent statements. They can be used to generate values for a primary key or any column that requires a unique value.
Identifying Sequences of Rows That Match a Pattern
Determine which users followed a specific sequence of pages and actions on your website before opening a support ticket or making a purchase. Find the stocks with prices that followed a V - shaped or W - shaped recovery over a period of time.
ALTER SEQUENCE
…nameSpecifies the identifier for the sequence to alter. If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case - sensitive.
CREATE SEQUENCE
…nameSpecifies the identifier for the sequence; must be unique for the schema in which the sequence is created. In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless…
CREATE INDEX
Creates a new secondary index in an existing hybrid table and populates the index with data. The creation of an index is an online (non - blocking) operation. The hybrid table remains available for SELECT and DML statements while the index…
Index hybrid tables
User - defined indexes, known as secondary indexes, that you can define on other columns as needed. A single index can cover one or more columns. You can use CREATE HYBRID TABLE or CREATE INDEX to define secondary indexes.
DROP SEQUENCE
…nameSpecifies the identifier of the sequence to drop. If the sequence identifier is not fully - qualified (in the form of db_name.schema_name.sequence_name or schema_name.sequence_name), the command looks for the sequence in the current…
DESCRIBE SEQUENCE
…nameSpecifies the identifier for the sequence to describe. Usage notes To post - process the output of this command, you can use the pipe operator or the RESULT_SCAN function. Both constructs treat the output as a result set that you can…
INDEX_COLUMNS view
Position of the column in the index, starting from 1. INDEX_OWNER TEXT Owner of the index. IS_UNIQUE TEXT With YES or NO, indicates whether this index is a unique index.
DROP INDEX
…index_nameSpecifies the identifier for the index. Usage notes This command can only be used to drop a secondary index. To drop an index that is used to enforce a UNIQUE or FOREIGN KEY constraint, use the ALTER TABLE command to drop the…
Source