23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CREATE PROCEDURE<br />

This example shows how to create an inactive word index with the description field specified:<br />

Notes • The first index you create on a table should be the most fundamental key of the table. This<br />

index (the first one created on a table) cannot be dropped except by dropping the table.<br />

• An index slows performance of INSERT, DELETE, and UPDATE operations.<br />

• Use PROUTIL to activate inactive indexes.<br />

• Use CREATE INDEX without the PRO_ACTIVE {’N’|’n’} attribute to create active<br />

indexes. Active indexes can only be created against an online database if the following<br />

conditions are met:<br />

– You run CREATE INDEX immediately after creating a table.<br />

– The index is created on the newly created table.<br />

– Both the CREATE TABLE and CREATE INDEX are performed within the same<br />

transaction (that is, no commit is performed after CREATE TABLE is run).<br />

Authorization<br />

Must have DBA privilege or INDEX privilege on the table.<br />

Related statements<br />

CREATE PROCEDURE<br />

CREATE UNIQUE INDEX custindex ON customer (cust_num);<br />

CREATE PRO_WORD INDEX CommentsWordIdx<br />

on pub.customer<br />

PRO_DESCRIPTION ’Word index on comments field’<br />

PRO_ACTIVE ’n’;<br />

ALTER TABLE, CREATE TABLE, DROP INDEX<br />

Creates a stored procedure. Stored procedures contain a Java code snippet that is processed into<br />

a Java class definition and stored in the database in text and compiled form. <strong>SQL</strong> applications<br />

invoke stored procedures through the <strong>SQL</strong> CALL statement or the procedure-calling mechanisms<br />

of ODBC and JDBC.<br />

15

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!