You can write a new SQL query with DB2 Web Query. You can then save or run the query.
To write a new SQL query:
1. In the desired connection branch of the DB2 Web Query navigation tree, click Queries.
The Queries menu appears.
2. From the drop-down menu, select New.
The Edit Query page opens.
3. In the Enter an SQL Statement field, type an SQL statement. You can include multiple statements in a single query, as well as comments and variables. You can also use lookup variables, which refer to other queries or results to produce a drop-down menu of substitution values.
DB2 Web Query supports the following comment formats: --comment, //comment. DB2 Web Query supports the following variable formats: [variable], :variable, ?, and &variable.
Tip: You must use a semi colon to separate multiple statements in a query.