Your ESL program may require SQL statements other than SELECT,, UPDATE, INSERT, or DELETE. For example, you may need to build SQL Data Definition Language (DDL) statements, such as CREATE TABLE and DROP, or SQL Data Control Language (DCL) statements, such as GRANT and REVOKE.
To create a DDL or DCL statement in DB/Assist, you must specify the statement type as Other in the New SQL Statement dialog box.
Then, to build an Other type SQL statement, you can do either of the following:
•Import the statement into DB/Assist from the clipboard or a file, as described in Importing a Statement into DB/Assist.
•Type the statement in the SQL Editor window, as described in Typing a Statement in the SQL Editor Window.
The following table lists the specific SQL statements that you can create in DB/Assist as an Other type. (For information about the syntax of these statements, refer to the IBM Structured Query Language (SQL) Documentation.)
SQL Statement |
Description |
ALTER TABLE |
Changes the description of a table. |
COMMENT ON |
Replaces or adds a comment to the description of a table, view, or column. |
COMMIT |
Terminates a unit of recovery and commits the database changes made by that unit of recovery. |
CREATE INDEX |
Defines an index on a table. |
CREATE TABLE |
Defines a table. |
CREATE VIEW |
Defines a view of one or more tables or views. |
DROP |
Deletes a table, index, package, or view. |
GRANT (Index Privileges) |
Grants the CONTROL privilege on indexes in the database. |
GRANT (Database Privileges) |
Grants privileges on the entire database. |
GRANT (Package Privileges) |
Grants privileges on packages in the database. |
GRANT (Table Privileges) |
Grants privileges on tables and views. |
LOCK TABLE |
Prevents concurrent processes from changing or using a table. |
REVOKE (Index Privileges) |
Revokes the CONTROL privilege on given indexes. |
REVOKE (Database Privileges) |
Revokes privileges from the entire database. |
REVOKE (Package Privileges) |
Revokes privileges from given access plans in the database. |
REVOKE (Table Privileges) |
Revokes privileges from given tables or views. |
ROLLBACK |
Terminates a unit of recovery and backs out the database changes made by that unit of recovery. |