Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003

    Unanswered: How to retrieve data randomly?

    I have a table called Questions and I need to retrieve 10 rows of data randomly each time. If I use

    SELECT TOP 10 Question FROM Questions

    I'll get the same questions each time when I execute the sql statement. Is there a way to get the random data? Thanks.

  2. #2
    Join Date
    Apr 2004
    Kansas City, MO
    SELECT TOP 10 Question FROM Questions ORDER BY NEWID()
    When life gives you a lemon, fire the DBA.

Posting Permissions

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