HP (Hewlett-Packard) 544530-001 Manuale Utente

Pagina di 142
SQL>
For more information, see the
.
Setting and Showing the Current Schema
By default, the schema of the session is USR. The SQL statement, SET SCHEMA, allows you to
set the schema for the Neoview Script session. For example, this SET SCHEMA statement 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.
SQL>
The schema that you specify with SET SCHEMA remains in effect until the end of the session or
until you execute another SET SCHEMA statement.
If you execute this statement in a script file, it affects not only the SQL statements in the script
file but all 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 statement, see the Neoview SQL Reference Manual.
The SHOW SCHEMA command displays the current schema for the session. For example, this
SHOW SCHEMA command displays SCHEMA PERSNL, where PERSNL is the name of the current
schema for the session:
SQL>show schema
SCHEMA PERSNL
SQL>
For more information, see the
.
Limiting the Result Set of a Query
To set the maximum number of rows to be returned by SELECT statements that are executed in
the session, enter the SET LIST_COUNT command. For example, this SET LIST_COUNT command
limits the result set of queries to 20 rows:
SQL>set list_count 20
To show the limit that is in effect for the session, enter the SHOW LIST_COUNT command. For
example, this SHOW LIST_COUNT command shows that the number of rows returned by
SELECT statements is unlimited:
SQL>show list_count
LISTCOUNT 0 [All Rows]
For more information, see the
and the
Showing Information About SQL Database Objects
Using Neoview Script Interface Commands
55