Skip to content

Instantly share code, notes, and snippets.

@superkarn
Last active July 19, 2018 20:53
Show Gist options
  • Save superkarn/e4c48263f0f735e962c1725a04faba49 to your computer and use it in GitHub Desktop.
Save superkarn/e4c48263f0f735e962c1725a04faba49 to your computer and use it in GitHub Desktop.
Generate random number in a query
-- https://stackoverflow.com/a/5003054
-- Generate a random number: 0= < x < 60
-- One random number per row of data.
select abs(checksum(newid()) % 60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment