Unsupported Features

Oracle’s JDBC implementation is quite complete except for a handful of fairly insignificant features. These features are part of the JDBC specification but are not implemented by Oracle. Even though they are not significant, it’s important for you to know what these features are, so you don’t think that you have a bug in a program when what you are really encountering is a problem from an attempt to use an unimplemented feature.

Named Cursors

A named cursor allows you to use a SQL-positioned UPDATE or DELETE using the cursor’s name. However, with Oracle, the ResultSet object’s getCursorName( ) method and the Statement object’s setCursorName( ) method are not supported. If you call this method, you’ll get a SQLException.

SQL92 Join Syntax

SQL92 join syntax is not supported. You need to use Oracle’s join syntax. For outer joins you need to use Oracle’s syntax involving the (+) character sequence. To left outer join you need to append (+) to the column on the lefthand side of the equal sign (=) for the columns specified in a WHERE clause. For a right outer join you need to append (+) to the righthand columns in a WHERE clause. The (+) character sequence denotes the optional table.

For example, to right outer join table A to table B on column code, your SQL statement will look something like this:

select a.name, 
       b.descr
from   A,
       B
where  a.code = b.code(+);

This SELECT statement will return all names from table A with all available descr values from table B.

PL/SQL Boolean, ...

Get Java Programming with Oracle JDBC now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.