Hi
I gave my exam yesterday. Following query question came up which I think was tough as I spend 10 minutes on this question then left it and then came back and finally solved it. A table was given. Result was given as ('Harry', 'Harry'). We were required to write the query ( a drag and drop question).
Table has 5 rows. Two containing first name as Harry. Table name was custmer. Account balance for one harry was 0 and other was 50. option to match first name was 'LIKE har%'. since option did not had 'Harry' plus there was another customer named 'Harold' so you cannot use LIKE Har% as it would also select harold.
for those who take the exam in near future the answer should select based on balance rather than first name.
I made up the following query and I dont know if it was right or wrong since I got 80% in my EJBQL oportion
SELECT cust.firstName
FROM Customer cust
WHERE cust.balance BETWEEN
0 AND 50
since one harry has 0 as balance and other has 50. no other row will match this option because no one has balance between 0 and 50.take care and good luck to those who are taking the
test.
Imad