Skip to content

Instantly share code, notes, and snippets.

@ConstantineK
Created October 19, 2016 16:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ConstantineK/c6de5d398ec43bab1a29ef07e8c21ec7 to your computer and use it in GitHub Desktop.
Save ConstantineK/c6de5d398ec43bab1a29ef07e8c21ec7 to your computer and use it in GitHub Desktop.
select n [id], SUSER_NAME(n) [user_name]
from (
select top 10000 row_number() over(order by t1.number) as N
from master..spt_values t1
cross join master..spt_values t2
) a
where SUSER_NAME(n) is not null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment