• Post Reply Bookmark Topic Watch Topic
  • New Topic

Please help with HQL

Ravi Desigan
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have 3 tables - a student table, a course table and a student_course table.

The table ddl's are as follows:

Now, I want to fetch all students who are NOT enrolled in a particular course.

The SQL would be:

In the above SQL, I would pass in the :course parameter.

Is the following HQL an equivalent of the above SQL and if so, is it correct?


Thank you!
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!