The CREATE ACCESS_METHOD (+) statement

Use the CREATE PRIMARY ACCESS_METHOD statement to register a new primary access method. When you register an access method, the database server places an entry in the sysams system catalog table.

Syntax

(1)
Notes:
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 Informix® Guide to SQL: Syntax.

Usage

The CREATE PRIMARY 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 primary access method named textfile that is in an extspace. The am_getnext purpose function is assigned to a function name that exists. The textfile access method supports clustering.
Figure 1: Sample CREATE PRIMARY ACCESS_METHOD statement
CREATE PRIMARY ACCESS_METHOD textfile(
AM_GETNEXT = textfile_getnext,
AM_CLUSTER,
AM_SPTYPE = ' X' );