The IBM DB2 UDB SQL Reference for Cross-Platform Development documents a subset of common
functionality that is available in the DB2 UDB Family (DB2 UDB for z/OS and
OS/390 Version 7, DB2 UDB for iSeries™ Version 5 Release 2, and DB2 UDB for Linux, UNIX®, and Windows® Version 8.1). Please refer to the DB2 UDB SQL Reference for
Cross-Platform Development and Derby documentation for more
information on features and behavioral differences.
Below is a listing of the Data-types Derby does not support which
DB2 UDB v 8.1 does support. Data-types not listed below are completely
supported by Derby.
Below is a listing of the Built-in functions Derby does not support which
DB2 UDB v 8.1 does support. Built-in functions not listed below are completely
supported by Derby.
Derby provides the message, SQLState values, and error codes. Use the
getSQLState and getMessage methods to view the SQLState and error messages. Derby does not support SQLCODEs. The value returned from
(SQLException sqle).getErrorCode()); is not defined.
|
ALTER TABLE
|
| |
DB2 UDB - contents may be specified more than once per alter
table statement. For example, adding a column and dropping a
constraint is allowed in the same ALTER TABLE statement.
|
| |
Derby - contents may not be specified more than once per alter
table statement.
|
|
BEGIN DECLARE SECTION
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support
|
|
CALL
|
| |
In JDBC, host-variable means question mark '?' which identifies a list of values to be passed as parameters to the procedure.
|
| |
cast-function-name host-variable
|
| |
cast-function-name constant
|
| |
USING DESCRIPTOR descriptor-name
|
|
CLOSE
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support. Use JDBC cursors instead.
|
|
COMMENT
|
| |
No support.
|
|
COMMIT
|
| |
No support. Use JDBC transaction semantics.
|
|
CONNECT (Type 1)
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|
|
CONNECT (Type 2)
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|
|
CREATE ALIAS
|
| |
No support.
|
|
CREATE DISTINCT TYPE
|
| |
No support.
|
|
CREATE FUNCTION (External Scalar)
|
| |
AS LOCATOR option for any data type
|
| |
RETURNS datatype-3 CAST FROM datatype-4
|
| |
LANGUAGE C
|
| |
PARAMETER STYLE DB2SQL
|
| |
SPECIFIC specific-name
|
| |
[NOT] DETERMINISTIC
|
| |
STATIC DISPATCH
|
| |
[NO] DBINFO
|
| |
[NO] EXTERNAL ACTION
|
| |
FENCED
|
| |
[NO] FINAL CALL
|
| |
[DIS]ALLOW PARALLEL
|
| |
NO SCRATCHPAD
|
| |
SCRATCHPAD length
|
|
CREATE FUNCTION (External Table)
|
| |
No Support.
|
|
CREATE FUNCTION (Sourced)
|
| |
No Support.
|
|
CREATE FUNCTION (SQL Scalar)
|
| |
No Support.
|
|
CREATE PROCEDURE (External)
|
| |
AS LOCATOR
|
| |
LANGUAGE C
|
| |
LANGUAGE COBOL
|
| |
PARAMETER STYLE DB2SQL
|
| |
PARAMETER STYLE GENERAL
|
| |
PARAMETER STYLE GENERAL WITH NULLS
|
| |
[NOT] DETERMINISTIC
|
| |
[NO] DBINFO
|
| |
FENCED
|
| |
PROGRAM TYPE MAIN
|
|
CREATE PROCEDURE (SQL)
|
| |
No Support.
|
|
CREATE TABLE
|
| |
LIKE table-name
|
| |
INCLUDING IDENTITY
|
| |
COLUMN ATTRIBUTES
|
| |
GENERATED ALWAYS BY DEFAULT AS IDENTITY
|
| | START WITH numeric-constant |
| |
INCREMENT BY numeric-constant
|
| |
MINVALUE numeric-constant
|
| |
MAXVALUE numeric-constant
|
| |
[NO] CACHE
|
| |
[NO] CACHE integer-constant
|
|
CREATE TRIGGER
|
| |
WHEN (search-condition)
|
| |
BEGIN ATOMIC triggered-SQL-statement; ... END
|
|
CREATE VIEW
|
| |
WITH CASCADED CHECK OPTION
|
| |
WITH LOCAL CHECK OPTION
|
|
DECLARE CURSOR
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support. Use JDBC cursors instead.
|
|
DECLARE GLOBAL TEMPORARY TABLE
|
| |
LIKE table-name INCLUDING IDENTITY COLUMN ATTRIBUTES INCLUDING COLUMN DEFAULTS
|
| |
LIKE view-name INCLUDING IDENTITY COLUMN ATTRIBUTES INCLUDING COLUMN DEFAULTS
|
| |
AS (fullselect) DEFINITION ONLY INCLUDING IDENTITY COLUMN ATTRIBUTES INCLUDING COLUMN DEFAULTS
|
| |
GENERATED ALWAYS AS IDENTITY
|
| |
START WITH numeric-constant
|
| |
INCREMENT BY numeric-constant
|
| |
MINVALUE numeric-constant
|
| |
MAXVALUE numeric-constant
|
| |
[NO] CYCLE
|
| |
[NO] CACHE integer-constant
|
|
DELETE
|
| |
view-name
|
| |
correlation-name
|
| |
WITH RR
|
| |
WITH RS
|
| |
WITH CS
|
|
DESCRIBE
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|
|
DROP
|
| |
ALIAS alias-name
|
| |
DISTINCT TYPE distinct-type-name
|
| |
SPECIFIC FUNCTION specific-name
|
| |
PACKAGE package-name
|
|
END DECLARE SECTION
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|
|
EXECUTE
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|
|
EXECUTE IMMEDIATE
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|
|
FETCH
|
| |
No support. Use JDBC cursors instead.
|
|
FREE LOCATOR
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|
|
GRANT (Distinct Type Privileges)
|
| |
No support.
|
|
GRANT (Function or Procedure Privileges)
|
| |
No support.
|
|
GRANT (Package Privileges)
|
| |
No support.
|
|
GRANT (Table or View Privileges)
|
| |
No support.
|
|
INCLUDE
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|
|
INSERT
|
| |
view-name (column-name)
|
| |
NULL
|
| |
WITH RR
|
| |
WITH RS
|
| |
WITH CS
|
|
OPEN
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support. Use JDBC cursors instead.
|
|
PREPARE
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|
|
RELEASE (Connection)
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|
|
REVOKE (Distinct Type Privileges)
|
| |
No support.
|
|
REVOKE (Function or Procedure Privileges)
|
| |
No support.
|
|
REVOKE (Package Privileges)
|
| |
No support.
|
|
REVOKE (Table and View Privileges)
|
| |
No support.
|
|
ROLLBACK
|
| |
ROLLBACK WORK is only supported with SAVEPOINT options.
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|
|
SELECT
|
| |
FETCH FIRST integer ROW[s] ONLY
|
| |
OPTIMIZE for integer ROW[s] ONLY
|
|
SELECT INTO
|
| |
No support.
|
|
SET CONNECTION
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|
|
SET PATH
|
| |
No support.
|
|
SET transistion-variable
|
| |
No support.
|
|
UPDATE
|
| |
Multiple column-names and expressions denoted by the asterisk * in the assignment-clause cannot be specified more than once in Derby.
|
| |
table-name correlation-name
|
| |
view-name correlation-name
|
| |
column-name (scalar-subselect)
|
| |
(column-name,*)=(expression,*)
|
| |
(column-name,*)=(NULL,*)
|
| |
(column-name,*)=(row-subselect)
|
| |
WITH RR
|
| |
WITH RS
|
| |
WITH CS
|
|
VALUES INTO
|
| |
No support.
|
|
WHENEVER
|
| |
DB2 UDB - Must not be specified in Java.
|
| |
Derby - No support.
|