Skip to content
Advertisement

Tag: random

How to request a random row in SQL?

How can I request a random row (or as close to truly random as is possible) in pure SQL? Answer See this post: SQL to Select a random row from a database table. It goes through methods for doing this in MySQL, PostgreSQL, Microsoft SQL Server, IBM DB2 and Oracle (the following is copied from that link): Select a random

Advertisement