2.1 List of SQL statements
The following table lists the SQL statements supported by HADB.
No. |
Classification |
SQL statement supported by HADB |
Description |
---|---|---|---|
1 |
Definition SQL |
Change a base table's definition information. |
|
2 |
Change an HADB user's information. |
||
3 |
Re-create a viewed table. |
||
4 |
Define audit targets. |
||
5 |
Define an index on a column in a base table. |
||
6 |
Define a schema. |
||
7 |
Define a base table. |
||
8 |
Create an HADB user. |
||
9 |
Define a viewed table. |
||
10 |
Delete the audit target definition. |
||
11 |
Delete an index. |
||
12 |
Delete a schema. |
||
13 |
Delete a base table. |
||
14 |
Delete an HADB user. |
||
15 |
Delete a viewed table. |
||
16 |
Grant privileges to an HADB user. |
||
17 |
Revoke privileges of an HADB user. |
||
18 |
Data manipulation SQL |
Delete rows. |
|
19 |
Insert rows into a table. |
||
20 |
Delete all the rows in a chunk. |
||
21 |
Retrieve data from a table. |
||
22 |
Delete all the rows in a base table. |
||
23 |
Update values in a row. |
||
24 |
Control SQL |
Validate the database contents that were updated by a transaction, and terminate the transaction normally. |
|
25 |
Invalidate the database contents that were updated by a transaction, and cancel the transaction. |
- Notes:
-
You can execute the above SQL statements from application programs or by using the adbsql command. However, control SQL statements (COMMIT and ROLLBACK) cannot be used in application programs.
-
If you are using the JDBC driver, use the commit method or rollback method in the Connection interface. For details about these methods, see the HADB Application Development Guide.
-
If you are using the ODBC driver, use the ODBC function SQLEndTran. For details about SQLEndTran, see the HADB Application Development Guide.
-
If you are using CLI functions, use a_rdb_SQLEndTran(). For details about a_rdb_SQLEndTran(), see the HADB Application Development Guide.
-
- Note
-
-
The SELECT statement is also called the retrieval SQL statement.
-
The INSERT, UPDATE, DELETE, PURGE CHUNK, and TRUNCATE TABLE statements are generically called update SQL statements.
-