Results 1 to 4 of 4

Thread: query

  1. #1
    Join Date
    Mar 2004
    Location
    chennai
    Posts
    9

    Unanswered: query

    i want one query. i am having one table. its contains
    sno,sname, totalmarks.
    i need to display first 5 students. those who are getting highiest total.
    please send sql query.

  2. #2
    Join Date
    Jan 2003
    Posts
    35
    Using the RANK function in the where clause....
    where RANK() OVER(ORDER BY totalmarks desc) < 6

    I think that would do it, or maybe:
    where ROWNUM < 6
    order by totalmarks desc
    "My Idea is that everyone should be required to use small fonts. That way we'll save disk space.
    ~Asok.

  3. #3
    Join Date
    Mar 2004
    Location
    chennai
    Posts
    9
    hai
    just now i got ur code.
    i am very happy about ur code.
    thank u.

  4. #4
    Join Date
    Apr 2004
    Location
    USA
    Posts
    28
    that should work hari

Posting Permissions

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