Skip to end of metadata
Go to start of metadata

Overview

APRE is similar to ORACLE-style precompiler(PRO*C).

Maybe, you may easily find a few differences from ALTIBASE HDB and ORACLE.

SELECT

  • SELECT statement can get only one record as a result. If you want to get multiple records, you have to use host variable arrays into "INTO" clauses.
    If you use a single host variable, you may return an error as follows.
  • APRE can use a host-variable into "SELECT target" clauses.
  • If SELECT can not find a target-record, you can see an error as follows.

INSERT

  • If a table has an unique constraints, you can see an error as follows.
  • If you try to insert a null value into column having not null constraint, you can encounter an error as follows.

UPDATE

  • If UPDATE can not find a target-record, you can see an error as follows.

DELETE

  • If DELETE can not find a target-record, you can encounter an error as follows.

MOVE

Move-statement is supported only by ALTIBASE HDB.
This functionality is commonly used for moving a records between tables from memory table to disk table vice versa.

Icon

You can locate some tables into memory for performance.

but, Physical memory has a limitation of space.
Therefore, When you need to move a records of memory-table to disk-table, you can use move-statement.

DML Returning

ORACLE can return a record changed after INSERT, UPDATE DML or before DELETE DML.
But, ALTIBASE HDB doesn't support this functionality unlike ORACLE.
This functionality will be applied in ALTIBASE HDB V7.

CURSOR-FETCH

You can manipulate a Cursor as below.

  • DECLARE CURSOR
  • OPEN CURSOR
  • FETCH CURSOR
  • CLOSE CURSOR
  • The cursor-name needs to be unique in your application.
  • You have to check an error on "DECLARE" and "OPEN" clauses.
    After you don't check an error on "DECLARE" phase, The error happens at "OPEN" phase.
    But, As you are not sure of the reason why error generated, you have to check an error at "DECLARE" phase.

SCROLLABLE CURSOR

ALTIBASE HDB doesn't support a scrollable-cursor.

Also, this functionality will be applied in the ALTIBASE HDB V7(Updatable Scrollable Cursor).

Sample Code

  • No labels