locked
Getting last 4 input? RRS feed

  • Question

  • User1278360556 posted

        There is a column that has data type "automatic number" and I want to get last 4 data.(Starts on the biggest number)

       Select * from yazilar Where yazi <= "biggest number"  and yazi >= "biggest number - 4"

        How can i do that?

    Thursday, January 29, 2009 8:45 AM

Answers

  • User1895067119 posted

     You could try:

    SELECT TOP 4 * FROM yazilar ORDER BY yazi DESC

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 29, 2009 11:13 AM

All replies

  • User-1360095595 posted

    Check if Access supports the MAX function.  Is it does, you can get the biggest number using MAX(fieldname).

    Thursday, January 29, 2009 9:07 AM
  • User1895067119 posted

     You could try:

    SELECT TOP 4 * FROM yazilar ORDER BY yazi DESC

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, January 29, 2009 11:13 AM