Scalable Database Server, HiRDB Version 8 UAP Development Guide

[Contents][Index][Back][Next]

18.3.3 SQL statements that can be used in SQLJ

Table 18-3 lists the SQL statements that can be used in SQLJ.

Table 18-3 SQL statements that can be used in SQLJ

Type SQL statement Usability Alternate means
Standard interface version Native interface version
Definition SQL statement All Y Y None
Data manipulation SQL statements ASSIGN LIST statement N (SQLJ) N (SQLJ) Use JDBC.
CALL statement Y Y None
CLOSE statement N (SQLJ) N (SQLJ) Use an iterator.
DECLARE CURSOR N (SQLJ) N (SQLJ)
DELETE statement Y Y None
DESCRIBE statement N (JDBC) N (JDBC)* Use JDBC.
DESCRIBE TYPE statement N (JDBC) N (JDBC)*
DROP LIST statement N (JDBC) N (JDBC)*
EXECUTE statement N (JDBC) N (JDBC)*
EXECUTE IMMEDIATE statement N (JDBC) N (JDBC)*
FETCH statement (Format 1 or 3) Y Y None
FETCH statement (Format 2) N N None
INSERT statement Y Y None
OPEN statement (Format 1) N (SQLJ) N (SQLJ) Use an iterator.
OPEN statement (Format 2) N (SQLJ) N (SQLJ) Use JDBC.
PREPARE statement N (SQLJ) N (SQLJ)
PURGE TABLE statement Y Y None
Single-row SELECT statement Y Y None
Dynamic SELECT statement N (JDBC) N (JDBC)* Use JDBC.
UPDATE statement Y Y None
Control SQL statements COMMIT statement Y Y None
COMMIT statement (RELEASE specified) N (SQLJ) N (SQLJ) Split into COMMIT and DISCONNECT.
CONNECT statement N Y None
DISCONNECT statement N Y None
LOCK statement Y Y None
CONNECT statement with RD-node specification N N None
DISCONNECT statement with RD-node specification N N None
ROLLBACK statement Y Y None
ROLLBACK statement (RELEASE specified) N (SQLJ) N (SQLJ) Split into ROLLBACK and DISCONNECT.
SET CONNECTION statement N N None
SET SESSION AUTHORIZATION statement N N None
Embedded language syntax BEGIN DECLARE SECTION N N None
END DECLARE SECTION N N None
ALLOCATE CONNECTION HANDLE N (SQLJ) N (SQLJ) Use a connection context.
DECLARE CONNECTION HANDLE N (SQLJ) N (SQLJ)
FREE CONNECTION HANDLE N (SQLJ) N (SQLJ)
GET CONNECTION HANDLE N N None
COPY N N None
GET DIAGNOSTICS N N None
WHENEVER N (SQLJ) N (SQLJ) Implement using try ... catch.

Legend:
Y: Can be used in SQLJ.
N (SQLJ): Cannot be used in SQLJ, but a similar function is available in the functions provided by SQLJ or JAVA.
N (JDBC): Cannot be used in SQLJ, but a similar function is available when JDBC is used.
N: Cannot be used in SQLJ.
None: There is no alternate means.

Note
SQLJ cannot use HiRDB functions that are not provided by the JDBC driver. The following functions cannot be used:
  • UPDATE statement and DELETE statement that use an iterator
  • Specification of a keyword in a WITH clause during the declaration of an iterator
  • INSERT function that uses an array

* If you use a JDBC connection object to create a connection context, you can also use the alternate means with the native interface. If you do not use a JDBC connection object to create a connection context, you cannot use the alternate means.