229
C H A P T E R 6
Using Procedures and Batches
About this chapter
This chapter explains how you create procedures and batches for use with
Adaptive Server IQ.
Procedures store procedural SQL statements in the database for use by all
applications. They enhance the security, efficiency, and standardization of
databases. User-defined functions are one kind of procedure that return a
value to the calling environment for use in queries and other SQL
statements. Batches are sets of SQL statements submitted to the database
server as a group. Many features available in procedures, such as control
statements, are also available in batches.
For many purposes, server-side JDBC provides a more flexible way to
build logic into the database than SQL stored procedures. For information
on JDBC, see Data Access Using JDBC in the Adaptive Server Anywhere
User’s Guide.
Overview of procedures
Procedures store procedural SQL statements in a database for use by all
applications.
Procedures can include control statements that allow repetition (
LOOP
statement) and conditional execution (
IF
statement and
CASE
statement)
of SQL statements.
Procedures are invoked with a
CALL
statement, and use parameters to
accept values and return values to the calling environment. Procedures can
also return result sets to the caller. Procedures can call other procedures.
User-defined functions are one kind of stored procedure that returns a
single value to the calling environment. User-defined functions do not
modify parameters passed to them. They broaden the scope of functions
available to queries and other SQL statements.
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...