Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB ql

 
rajaji raja
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can i get all the data from the table
i.e can i use select * from emp where ename=" "
in EJB ql
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"rajaji",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp.
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements.
Thanks.
Dave
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rahaji,
EJB-QL is not SQL. It's an object-based query language so you'll need to handle objects instead of data.
Here's an example query for what you're trying to do:
SELECT e FROM emp e WHERE emp.name = ?1
Some learning resources:
Rick Hightower's tutorial
EJB-QL World's links
Caucho's (Resin) EJB tutorial
Learning EJB-QL, an article at OnJava.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic