#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Chennai
    Posts
    160
    Rep Power
    11

    Angry How to take top 5 records using select in postgres


    hi

    how to take the top 5 records in postgres
    is that like this select top 5 * from table order by primary key
    but its not working out


    please can any one help me

    chandar
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    select * from table order by primaryKey limit 5

IMN logo majestic logo threadwatch logo seochat tools logo