Hi,

I have a 3-tier architecture using JDBC where i sometimes want an empty resultset from the tatabase in order to create a serializable RowSet datatype using the metadata.

If I use an SQL statement like Select ... from X where PK='unreachable'
the DB has to perform an indexed scan of the table, right?

I got a tip that i might trick Oracle by saying Select ... from X where 1=2
to make the question return immediately. However it seems like the DB has to perform a full table scan here, not grasping that the where clause is unreachable.

So the question is : How to immediately get a resultset consisting of 0 rows with the metadata etc?

Thanks in advance,