At the company I work job applicants are required to do a little exam.
The human resource manager recently had a candidate who claimed one of the questions was ambiguous.
The HRM asked me to look into the matter, but since I am no expert in the in the workings of DB2 I submit the question to you hoping any of you can give me a definitive answer.
The question on the exam is :
Code:
Given a table PARTS with a primary key
PARTNO CHAR(15)
A select
SELECT * FROM PARTS
WHERE PARTNO = :WS-PART
in which the host variable is declared as
WS-PART PIC X(12).
This wil be executed using :
1) an index scan
2) a table scan
3) this will give a compilation error
The candidate claimed that a table scan was used prior to version 8 of DB2
while starting at version 8 an index scan is used.
Can anybody confirm this ??
Does anybody know of a manual or an other source of information from IBM where this is described ??
Your help is appreciated
Luke