• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Hibernate Query with AND condition

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

New to Hiebrnate..


I have normal sql query like...

select * from emplyee where emp_id='1' and emp_name='2'

I want to oass both values of emp_id and emp_name as parameters.Could you help me this..

Thanks,
livefree
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"live free"

Welcome to JavaRanch

Please check your private message, for a message from JavaRanch.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by live free:
I have normal sql query like...

select * from emplyee where emp_id='1' and emp_name='2'

I want to oass both values of emp_id and emp_name as parameters.Could you help me this..



It would be something like:



Also, have a look at Chapter-16 Native SQL in Hibernate.

Originally posted by live free:
Hi,

New to Hiebrnate..


This will get you started.
 
reply
    Bookmark Topic Watch Topic
  • New Topic