T TSQL: Generate random string of desired length January 14, 2016 1 Min Read 0 112 January 14, 2016 1 Min Read 0 112 DECLARE @DesiredLength AS INT = 10; SELECT Lower(substring(replace(newID(), ‘-‘, ”), cast(RAND() * (31 – @DesiredLength) AS INT), @DesiredLength)) AS RandomString; Snippets Paris Polyzos Continue Reading