• Post Reply Bookmark Topic Watch Topic
  • New Topic

Please help with HQL  RSS feed

 
Ravi Desigan
Ranch Hand
Posts: 35
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

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!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!