• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Are these two EJB-QL statements the same meaning?

 
Steven Gao Song
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) SELECT Object(s) FROM Student s

and

2) SELECT Object(s) FROM Student s, IN (s.courses) c

I think they should return the same result. Am I right?

Thank you.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I think that the second one will return only students enrolled in a course. It would be the same as :
SELECT Object(s) FROM Student s
WHERE s.courses IS NOT EMPTY
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic