openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C N Davies" <>
Subject RE: SELECT TOP n records Equilent in JPQL
Date Fri, 18 Jun 2010 11:07:52 GMT
OK assuming you have an entitymanager object called em

Query query = em.createQuery("select blah blah ....");
List ret = query.getResultList();

Returns the first record matching your query.

-----Original Message-----
From: SreeAsh [] 
Sent: Friday, 18 June 2010 8:52 PM
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:
Sent from the OpenJPA Users mailing list archive at

View raw message