"Miha Vrhovnik"<[EMAIL PROTECTED]> writes:

> SELECT * FROM Mactor WHERE id < 9223372036854775807 ORDER BY id DESC LIMIT 1;
>
> where 9223372036854775807 is Maximum value of signed Int64.
>
> P.S. If anybody has better Idea of how to get the last/first row (the one
> with highest/lowest ID) then comments are welcome.
>

How about these:

  SELECT * from Mactor WHERE id = (SELECT MAX(id) FROM Mactor);
  SELECT * from Mactor WHERE id = (SELECT MIN(id) FROM Mactor);

Derrell

Reply via email to