APRE is similar to ORACLE-style precompiler(PRO*C).
Maybe, you may easily find a few differences from ALTIBASE HDB and ORACLE.
- 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.
- 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.
- If UPDATE can not find a target-record, you can see an error as follows.
- If DELETE can not find a target-record, you can encounter an error as follows.
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.
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.
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.
ALTIBASE HDB doesn't support a scrollable-cursor.
Also, this functionality will be applied in the ALTIBASE HDB V7(Updatable Scrollable Cursor).