Results 1 to 6 of 6

Thread: Need Query

  1. #1
    Join Date
    Jun 2007
    Posts
    14

    Smile Need Query

    Hi all ,
    I am ram , i want to find the fifth maximum value . please how to make a simple query for this

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Try this:

    select top 1 * from (select top 5 * from Table1 order by col1 desc) as a order by col1

  3. #3
    Join Date
    Jun 2007
    Posts
    14

    Query is not working

    Hi,
    Thank u for to send the query , but the query is not working . showing syntax error

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Can you post your query? Did you run your query on sql server?

  5. #5
    Join Date
    Jun 2007
    Posts
    14

    Need Query

    select top 1 * from ( select top 5 * from tbltest order by tdnum desc ) as a order by tdnum

    i run this query in MySql

  6. #6
    Join Date
    Sep 2002
    Posts
    5,938
    This is sql server forum so the query I gave is t-sql. Post your issue in MySQL forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •