On this page
SHOW QUERY
Core command
SH QU
SHQU
Shows the last SQL query of the session, the one that / runs again.
Syntax
SHOW QUERY
Examples
SELECT * FROM CUSTOMER WHERE COUNTRY = 'FR';
SHOW QUERY;
//
Example session
WORLD-QA> SELECT COUNT(*) AS CITIES FROM CITY WHERE COUNTRYCODE = 'FRA';
|--------------------|
|CITIES |
|--------------------|
|41 |
|--------------------|
1 rows fetched in 5 ms.
WORLD-QA> / PROD
Running last query on WORLD [PROD]...
|--------------------|
|CITIES |
|--------------------|
|40 |
|--------------------|
1 rows fetched in 0 ms.
WORLD-QA>
Details
The query is printed on a single line, convenient for reading and copying even when it was typed or pasted over several lines. When no query has run yet, the command prints No query in memory.
It is the statement that / runs again, and that / <environment> runs once against another Environment of the current Database Group. // is a shortcut for SHOW QUERY.
Related
Used in these how-tos
Last modified in release 5.5.0.
Found something wrong or unclear on this page? Tell us, with the page address.