Random Sort Order
Random Sort Order
Summary: An example of how data can be sorted randomly
- DECLARE @TEST TABLE (id int IDENTITY(1,1), value varchar(10))
- INSERT @TEST VALUES ('A')
- INSERT @TEST VALUES ('B')
- INSERT @TEST VALUES ('C')
- INSERT @TEST VALUES ('D')
- INSERT @TEST VALUES ('E')
- INSERT @TEST VALUES ('F')
- SELECT value
- FROM @TEST
- ORDER BY NEWID()