Skip to content

Instantly share code, notes, and snippets.

@ekaraman89
Last active July 18, 2019 16:55
Show Gist options
  • Save ekaraman89/c43425e5a4d706ea90a56cfaff71e05f to your computer and use it in GitHub Desktop.
Save ekaraman89/c43425e5a4d706ea90a56cfaff71e05f to your computer and use it in GitHub Desktop.
t-sql random string
String > SUBSTRING(CONVERT(varchar(40), NEWID()),0,9)
0 - 1 > convert(bit, round(1*rand(),0))
5 - 40 > Cast(RAND()*(40-5)+5 as int)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment