Retrieving a List of Columns

From InterBase
Jump to: navigation, search

Go Up to Listing Columns to Retrieve with SELECT


To retrieve a subset of columns for a row of data, list each column by name, in the order of desired retrieval, and separate each column name from the next by a comma. Operations that retrieve a subset of columns are often called projections.

For example, the following SELECT retrieves three columns:

EXEC SQL
SELECT EMP_NO, FIRSTNAME, LASTNAME
INTO :emp_no, :fname, :lname
FROM EMPLOYEE WHERE EMP_NO = 2220;