Matthew Stuart schrieb:

> I've got this statement to select the last two entries in my db:
>
> SELECT top 2 *
> FROM Content
> ORDER BY ContentID desc
>
> and it works fine because it selects the last two items entered into the db. However, I only want to be able to select item 2 rather than both 1 and 2. How do I do that?

Hi Mat,

"TOP 2" is not MySQL?

However, MySQL knows LIMIT [1] which is more powerful, try:

  SELECT *
  FROM Content
  ORDER BY ContentID DESC
  LIMIT 1,1

regards
  -Ralf

[1]: http://dev.mysql.com/doc/refman/5.0/en/select.html


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to