OK assuming you have an entitymanager object called em
Query query = em.createQuery("select blah blah ....");
query.setMaxResults(1);
List ret = query.getResultList();
Returns the first record matching your query.
-----Original Message-----
From: SreeAsh [mailto:[email protected]]
Sent: Friday, 18 June 2010 8:52 PM
To: [email protected]
Subject: RE: SELECT TOP n records Equilent in JPQL
Hi crispyoz ,
i need to get TOp 1 record from table my query like this...
SELECT TOP 1 * from tblName
--
View this message in context:
http://openjpa.208410.n2.nabble.com/SELECT-TOP-n-records-Equilent-in-JPQL-tp
5194742p5194825.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.