posted 14 years ago
Hello
could some one please explain how option 2 "SELECT c FROM Student s, IN(s.course) AS c where s.grade='A'" in this question "com.enthuware.ets.scbcd.v5.2.181" is vaild ?
Which of the following JPQL queries are correct?
select 3 options
1 select student.name from Student
2 SELECT c FROM Student s, IN(s.course) AS c where s.grade='A'
3 SELECT s FROM Student s WHERE s.grade BETWEEN 'A' and 'C'
4 SELECT s FROM Student s WHERE s.score NOT IN (90, 80, 70)
I agree with the fact that the first one is incorrect as
You cannot use the abstract persistent schema name (here, Student) as the name of the variable.
and that 3 and 4 are correct but I can not see option 2 working corectly
Please help
Msany thanks