9 Replies Latest reply on May 6, 2003 8:28 PM by Juha Lindfors

    SELECT MAX to find primary key

    marc.dorchain Newbie

      Hi all,

      I need t find the last inserted row of a table. Without ejb and cmp, I simple do a
      "SELECT max(id) from table".
      I just can't get it to work.
      I always get errors trying ejb-ql like this in ejb-jar.xml:
      "SELECT MAX (t.id) FROM TableEJB AS t".

      Any help woul really be appreciated! Thank you!
      Marc