• DECLARE @MaxThought INT;

    SELECT @MaxThought = MAX(thoughtid) FROM TRP_thoughts;

    SELECT * FROM TRP_thoughts WHERE thoughtid = FLOOR(RAND(CHECKSUM(NEWID()))*@MaxThought)+1;

    Should get you a random row each time, and is more efficient than the usual TOP (1) ... ORDER BY NewID(). If there's gaps in the identity sequence you could end up not getting a row sometimes though.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass