Retrieving All Columns
Go Up to Listing Columns to Retrieve with SELECT
To retrieve all columns of data, use an asterisk (*) instead of listing any columns by name. For example, the following SELECT
retrieves every column of data for a single row in the EMPLOYEE
table:
EXEC SQL SELECT * INTO :emp_no, :fname, :lname, :phone_ext, :hire, :dept_no, :job_code, :job_grade, :job_country, :salary, :full_name FROM EMPLOEE WHERE EMP_NO = 1888;
- Important: You must provide one host variable for each column returned by a query.