SQL/MX 3.2.1 Reference Manual (H06.26+, J06.15+)
MXCI Commands
HP NonStop SQL/MX Release 3.2.1 Reference Manual—691117-004
4-74
SHOW PREPARED Command
SHOW PREPARED Command
The SHOW PREPARED command is used to display prepared statements in the
current MXCI session.
Use SHOW PREPARED only within an MXCI session.
* | ALL
displays all the currently prepared statements.
See An operation is a postfix merge if the range of data ends at the bottom of the
partition. You can specify only the TO NEXT PARTITION clause. The split partition
cannot be the last partition (the rightmost partition in the list). on page 2-279.
Examples of SHOW PREPARED
•
Display all currently prepared statements:
>>SHOW PREPARED;
FINDEMP
SELECT * FROM PERSNL.EMPLOYEE WHERE SALARY > 40000.00
AND JOBCODE = 450;
EMPCOM
SELECT FIRST_NAME, LAST_NAME, DEPTNUM FROM PERSNL.EMPLOYEE
WHERE DEPTNUM <> 1500 AND SALARY <= (SELECT AVG(SALARY)
FROM PERSNL.EMPLOYEE WHERE DEPTNUM = 1500);
•
This command also displays all currently prepared statements:
>>SHOW PREPARED *;
FINDEMP
SELECT * FROM PERSNL.EMPLOYEE WHERE SALARY > 40000.00
AND JOBCODE = 450;
EMPCOM
SELECT FIRST_NAME, LAST_NAME, DEPTNUM FROM PERSNL.EMPLOYEE
WHERE DEPTNUM <> 1500 AND SALARY <= (SELECT AVG(SALARY)
FROM PERSNL.EMPLOYEE WHERE DEPTNUM = 1500);
SHOW PREPARED [* | ALL]
Note. The SHOW PREPARED command displays all the currently prepared statements
regardless of whether you specify the * or the ALL option.










