HPlogo ALLBASE/SQL Database Administration Guide: HP 3000 MPE/iX Computer Systems > Appendix G SQLGEN

GENERATE INDEXES

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Generates the SQL commands necessary to recreate indexes for one or more tables of the DBEnvironment.

Scope

SQLGEN Only

SQLGEN Syntax

>> [GENERATE]INDEX[ES] Schema File Name or '//' to STOP command >> SchemaFileName Owner Name >> OwnerName Do you wish to specify Table Names for each Owner (n/y)? { N [O] Y [ES]} Table Name for Owner OwnerName >> TableName

Parameters

SchemaFileName

is the name of the schema file where SQLGEN places the generated commands.

OwnerName

is the name of the Owner for whom you want to GENERATE INDEXES.

NO or YES

respond YES to specify certain tables for the named owner; respond NO to select all table names for the owner.

TableName

is the name of a table for which you wish to GENERATE INDEXES.

Example

   >> generate indexes



   ALLBASE/SQL Command Generator for INDEXES



   Schema File Name or '//' to STOP command >> indxpart



   Please enter Owner Names. Type @ for all, ? for a list of

   Owner Names, or RETURN to quit.



   Owner Name >> @

   Do you wish to specify Table Names for each Owner (n/y)? n



   Generating CREATE INDEX on PURCHDB.INVENTORY

   Generating CREATE INDEX on PURCHDB.ORDERITEMS

          .                  .

   >>


Schema File Produced

 

    CREATE UNIQUE INDEX INVPARTNUMINDEX

      ON PURCHDB.INVENTORY

      (PARTNUMBER);



   CREATE CLUSTERING INDEX ORDERITEMINDEX

      ON PURCHDB.ORDERITEMS

      (ORDERNUMBER);



   CREATE CLUSTERING INDEX ORDERNUMINDEX

      ON PURCHDB.ORDERS

      (ORDERNUMBER);

          .               .

          .               .

          .               .



   COMMIT WORK;


Feedback to webmaster