Results 1 to 4 of 4

Thread: DB2 Query

  1. #1
    Join Date
    Sep 2012
    Posts
    1

    Talking Unanswered: DB2 Query

    Query to get top five employees who have got highest salary drown?

    Thanks in advance

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    very short question that will receive no answers..
    supply at least : version-platform-ddl-sample data and what is expected
    have you already tried yourself a query or just waiting for someone to supply a custom solution (for free)
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Jun 2007
    Location
    germany
    Posts
    155
    you could start by discovering the effects of ORDER BY
    in conjunction with FETCH FIRST n ROWS ONLY

    as far as the other requirement, SQL does not have any liquidation tools.
    Dick Brenholtz, Ami in Deutschland

  4. #4
    Join Date
    Apr 2008
    Posts
    39
    you can use something like mentioned below

    select salary from <table> order by salary desc fetch first 5 rows only"

Posting Permissions

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