Select a random row from a table in SQL Server using NewId()

To select a random row from a table using NewID() UniqueIdentifier use this code:

SELECT TOP 1 NewId()
AS random_column, *
FROM Table_name ORDER BY random_column

NewId() creates unique value of type uniqueidentifier.

Here is the same result without displayed NewId() column:

SELECT TOP 1 *
FROM Table_name ORDER BY NewId()

To select a random row from a Person.Person table:

SELECT TOP 1 *
FROM Person.Person ORDER BY NewId()

random_person_person_row

To select 100 random rows from a table using NewID() UniqueIdentifier use this code:

SELECT TOP 100 *
FROM Table_name ORDER BY NewId()