The CREATE ACCESS_METHOD (+) statement
Use the CREATE SECONDARY ACCESS_METHOD statement to register a new secondary access method. When you register an access method, the database server places an entry in the sysams system catalog table.
Syntax
>>-CREATE--SECONDARY--ACCESS_METHOD--access-method name---------> .-,----------------------. V (1) | >--(----| Purpose Option |-----+--)----------------------------><
Notes:
- See Purpose options
Element | Purpose | Restrictions | Syntax |
---|---|---|---|
access-method name | The access method to add | The access method must have a unique name in the sysams system catalog table. | Database Object Name segment; see HCL Informix® Guide to SQL: Syntax. |
Usage
The CREATE SECONDARY ACCESS_METHOD statement adds a user-defined access method to a database. When you create an access method, you specify purpose functions, purpose flags, or purpose values as attributes of the access method.
You must have the DBA or Resource privilege to create an access method.
Sample statements
The following statement
creates a secondary access method named T-tree that is in an
sbspace. The am_getnext purpose function is assigned
to a function name that already exists. The T_tree access method
supports unique keys and clustering.
Figure 1. Sample CREATE SECONDARY ACCESS_METHOD
statement
CREATE SECONDARY ACCESS_METHOD T_tree(
AM_GETNEXT = ttree_getnext,
AM_UNIQUE,
AM_CLUSTER,
AM_SPTYPE = ’ S ’ );