This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes EJB ql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB ql" Watch "EJB ql" New topic

EJB ql

rajaji raja

Joined: Jul 27, 2003
Posts: 9
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

Joined: Mar 06, 2001
Posts: 13459

The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at
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.
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
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 = ?1
Some learning resources:
Rick Hightower's tutorial
EJB-QL World's links
Caucho's (Resin) EJB tutorial
Learning EJB-QL, an article at

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link:
subject: EJB ql
It's not a secret anymore!