In SQL, you can do this
Select Top 1 * from xxx order by newid (), where newID () is the SQL own function.