title: Getting Random Records From Database For Quiz Game
body: <p>I want help from you to create a query. I am new in software career and i am trying to developing a KBC Type Quiz Game for Windows Mobile Application. For That i want try to fetch random records from database and if one record is appear at one time after that record will not appear again. I use This query <code>"SELECT TOP 1 * FROM Quiz ORDER BY NEWID()"</code> but records are repeat.</p>
  
  <p>My Table structure is given below.</p>
  
  <pre><code>ColumnName  DataType
  
  Id          int
  Que         varchar(150)
  Ans1        varchar(100)
  Ans2        varchar(100)
  Ans3        varchar(100)
  TrueAns     varchar(100)
  </code></pre>
  
  <p>I try to create a Store Procedure also which is given below</p>
  
  <pre><code>DECLARE @counter int, @randno int, @uBound int, @lBound int
  
  
          SELECT @uBound = Max(Id) FROM Quiz
          SELECT @lBound = Min(Id) FROM Quiz
  
          SELECT @randno = Round(((@uBound - @lBound) * Rand() + @lBound), 0)
          SET @Counter = 0
  
          WHILE @counter = 0
          BEGIN
              IF EXISTS(SELECT Id FROM Quiz WHERE Id = @randno)
              BEGIN
                  SET NOCOUNT OFF
                  SELECT * FROM Quiz WHERE Id = @randno
                  SET @counter = 1
              END
              ELSE
              BEGIN
                  SELECT @randno = Round(((@uBound - @lBound -1 ) * Rand() + @lBound), 0)
              END
          END
  </code></pre>
  
  <p>but i can't get success. My Table contain this fields Que, Ans1, Ans2, Ans3, TrueAns. Please Help me for this problem. And i want to also create a web-service which return all the records </p>