Random string in SQL 31 Tuesday Jan 2012 Posted by marygiel in Code, SQL ≈ Leave a Comment Tagsrandom strings, sql replace, substring One line way to get a random strings in SQL. SELECT Substring(Replace(CONVERT(varchar(255), NEWID()),'-',''),0,10)