You might want to see the SQL statements that make up a query you create with Prompted Query. For example, you might want to know if your prompted query is equivalent to another SQL query.
When you display the SQL equivalent of a prompted query, you cannot edit, run, or save the query you display.
To display the SQL equivalent of a prompted query:
Or you can:
Enter SHOW SQL on the command line.
The SQL equivalent of the prompted query displays.
PROMPTED QUERY USERID.MYQUERY LINE 1 +----------------------------------------------------------+ Tables: | SQL | Q.STAFF(A) | | Q.ORG(B) | The following SQL statement is equivalent to your query. | | 1 to 5 of 5 | Join Tables: | SELECT A.DEPT, A.SALARY, B.LOCATION | A.DEPT And B | FROM Q.STAFF A, Q.ORG B | | WHERE ((B.DIVISION = 'EASTERN') | Columns: | OR (A.DEPT = 84)) | DEPT | AND (A.DEPT = B.DEPTNUMB) | SALARY +----------------------------------------------------------+ LOCATION | F1=Help F7=Backward F8=Forward F12=Cancel | +----------------------------------------------------------+ Row Conditions: If DIVISION Is Equal To 'EASTERN' Or DEPT Is Equal To 84 *** END ***
You will learn more about SQL in Viewing the data in the database using SQL statements.