Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007

    Unanswered: Retrieving random records

    I did a few searches before posting but could not find an answer.

    Does anyone know the SQL (if any) to retrieve 10 random records from a table? This is pretty easy in MS SQL Server but I cannot find a solution for Sybase.

    Thank you very much.


  2. #2
    Join Date
    May 2005
    South Africa
    Provided Answers: 1
    Try this
    select top 10 id, name
    ,r=(select rand() from sysobjects b where
    from sysobjects a
    where name like 'sys%'
    order by r

Posting Permissions

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