wood burning stoves
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
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 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.
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 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

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link: http://aspose.com/file-tools
subject: EJB ql
jQuery in Action, 3rd edition