A procedure can return more than one result set to the calling environment.
By default, Interactive SQL does not show multiple result sets. To enable multiple result set functionality, you can use the Options window in Interactive SQL, or you can execute a SQL statement to set the isql_show_multiple_result_sets option. The setting takes effect immediately and remains in effect for future sessions until disabled.
Connect to the database as a user with DBA authority.
In Interactive SQL, click Tools » Options.
Click SQL Anywhere.
In the Results tab, click Show All Result Sets.
Click OK.
Connect to the database as a user with DBA authority.
Execute the following statement:
SET OPTION isql_show_multiple_result_sets=On |
After you enable this option, Interactive SQL shows multiple result sets.
If a RESULT clause is employed in a procedure definition, the result sets must be compatible: they must have the same number of items in the SELECT lists, and the data types must all be of types that can be automatically converted to the data types listed in the RESULT clause.
If the RESULT clause is omitted, a procedure can return result sets that vary in the number and type of columns that are returned.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |