Dynamically Determining Result Sets

All of the examples up to this point have assumed that the developer knows what data is to be retrieved from a table. The SELECT statement columns are known beforehand, so the application can be written to handle the number of columns being retrieved, along with the data types required to accept the column values. However, some applications need to dynamically determine the columns being retrieved based on user input. Consider also the case in which a SELECT * is issued against a table. When a table is created, the columns that are retrieved by a SELECT * might be known. But over time, the design of the table might change, so the order and even the number of columns might be different. Errors will result if ...

Get Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ 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.