EasyManuals Logo

IBM DB2 User Manual

IBM DB2
585 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #307 background imageLoading...
Page #307 background image
Related reference
“SQLJ statement-clause” on page 288
SQLJ assignment-clause
The assignment clause assigns the result of an SQL operation to a Java variable.
Syntax
 Java-ID = { fullselect }
order-by-clause optimize-for-clause
isolation-clause
queryno-clause
fetch-first-clause
iterator-conversion-clause

Description
Java-ID
Identifies an iterator that was declared previously as an instance of an iterator
class.
fullselect
Generates a result table.
iterator-conversion-clause
See SQLJ iterator-conversion-clause for a description of this clause.
Usage notes
v If the object that is identified by Java-ID is a positioned iterator, the number of
columns in the result set must match the number of columns in the iterator. In
addition, the data type of each column in the result set must be compatible with
the data type of the corresponding column in the iterator. See Java, JDBC, and
SQL data types for a list of compatible Java and SQL data types.
v If the object that is identified by Java-ID is a named iterator, the name of each
accessor method must match, except for case, the name of a column in the result
set. In addition, the data type of the object that an accessor method returns must
be compatible with the data type of the corresponding column in the result set.
v You can put an assignment clause anywhere in a Java program that a Java
assignment statement can appear. However, you cannot put an assignment
clause where a Java assignment expression can appear. For example, you cannot
specify an assignment clause in the control list of a for statement.
Related concepts
“SQLJ and JDBC in the same application” on page 139
Related reference
“SQLJ executable-clause” on page 287
“SQLJ iterator-conversion-clause”
SQLJ iterator-conversion-clause
The iterator conversion clause converts a JDBC ResultSet to an iterator.
Syntax
Chapter 7. JDBC and SQLJ reference information 291

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM DB2 and is the answer not in the manual?

IBM DB2 Specifications

General IconGeneral
DeveloperIBM
Initial Release1983
LicenseProprietary
Written inC, C++
CategoryDatabase Management System (RDBMS)
Operating SystemLinux, Windows
Programming LanguagesC, C++
Data ModelsRelational
EditionsCommunity, Standard, Advanced
Key Featureshigh availability, scalability