Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Randomly ordered results in TSQL (See related posts)

SELECT TOP 10 userID
FROM user
ORDER BY NEWID()

or
SELECT TOP 10
        NEWID() [egg],
        userID
FROM user
ORDER BY [egg]

or
SELECT TOP 10
        NEWID(),
        userID
FROM user
ORDER BY 1

only tried the above with TSQL

You need to create an account or log in to post comments to this site.


Related Posts