SQL/MX Remote Conversational Interface (RMXCI) Guide for SQL/MX Release 3.1 (H06.23+, J06.12+)

Setting and showing the current schema
By default, the schema of the session is PUBLIC_ACCESS_SCHEMA and catalog is
NONSTOP_SYSTEM_NSK. The SQL statement set schema, allows you to set the schema for the
RMXCI session. For example, the following set schema command changes the default schema
to PERSNL for the session:
SQL>set schema persnl;
--- SQL operation complete.
SQL>delete from employee where first_name='TIM' and last_name='WALKER';
--- 1 row(s) deleted.
The schema, which you specify with set schema remains in effect until the end of the session or
until you run another set schema statement.
If you run this statement in a script file, it not only affects the SQL statements in the script file but
also all the subsequent SQL statements that are run in the current session. If you set the schema in
a script file, reset the default schema for the session at the end of the script file.
For more information about the set schema command, see the SQL/MX Release 3.x Reference
Manual.
The show schema command displays the current schema for the session. For example, the following
show schema command displays SCHEMA PERSNL, where PERSNL is the name of the current
schema for the session:
SQL>show schema
SCHEMA PERSNL
You can also specify the catalog where the schema resides. For example:
SQL>set schema cat1.persnl;
The show catalog command will show CAT1 and the show schema command shows PERSNL.
If you do not specify the catalog in set schema statement, the catalog for the schema will be the
catalog that appears with show catalog command. For more information, see the “SHOW
SCHEMA command” (page 108).
The set catalog command sets the current catalog. For more information about the set catalog
statement, see the SQL/MX Release 3.x Reference Manual.
NOTE: RMXCI uses NONSTOP_SYSTEM_NSK as the default catalog and
PUBLIC_ACCESS_SCHEMA as the default schema. If you plan to use the defaults and they do not
exist, then create the default catalog and schema by using super.super (255,255) id. HP
recommends that you do not use the default catalog and schema. Instead, use set catalog and
set schema commands to set the session defaults.
Limiting the result set of a query
To set the maximum number of rows to be returned by SELECT statements, which are run in the
session, run the set list_count command. For example, the following command limits the result
set of queries to twenty rows:
SQL>set list_count 20
To show the limit, which is in effect for the session, run the show list_count command. For
example, the following command shows that the number of rows returned by SELECT statements
is unlimited:
SQL>show list_count
LISTCOUNT 0 [All Rows]
Using RMXCI commands 37