2 Replies Latest reply on Apr 9, 2007 9:42 AM by horikawa yoji

    random selection with ejbql

    horikawa yoji Newbie

      hi fellaz.

      I'm developing a web app using EJB3.0 and MySQL but I came up w/ the EJBQL problem.

      I need to write the EJBQL query to select RANDOM 150 records from a DB.

      Is there anyway I can do it?

      I know MySQL provides a rand() option and I know there is a method called createNativeQuery.

      but my boss doesn't wanna use createNativeQuery for some reason...

      Any info will be appreciated.
      THNX!