Contents Index Java is case sensitive Printing to the command line

ASA Programming Guide
  Introduction to Java in the Database
    The runtime environment for Java in the database

Strings in Java and SQL


A set of double quotes identifies string literals in Java, as in the following Java code fragment:

String str = "This is a string";

In SQL, however, single quotes mark strings, and double quotes indicate an identifier, as illustrated by the following SQL statement:

INSERT INTO TABLE DBA.t1
VALUES( 'Hello' )

You should always use the double quote in Java source code, and single quotes in SQL statements.

For example, the following SQL statements are valid.

CREATE VARIABLE str char(20);
SET str = NEW java.lang.String( 'Brand new object' )

The following Java code fragment is also valid, if used within a Java class.

String str = new java.lang.String(
            "Brand new object" );

Contents Index Java is case sensitive Printing to the command line