Skip to content

Instantly share code, notes, and snippets.

@cbmeeks
Created July 26, 2013 14:05
Show Gist options
  • Save cbmeeks/6089123 to your computer and use it in GitHub Desktop.
Save cbmeeks/6089123 to your computer and use it in GitHub Desktop.
Random String in DB2
select
CHR( INT(RAND()*26) + 65) || CHR( INT(RAND()*26) + 65) || CHR( INT(RAND()*26) + 65) || CHR( INT(RAND()*26) + 65) || CHR( INT(RAND()*26) + 65) ||
CHR( INT(RAND()*26) + 65) || CHR( INT(RAND()*26) + 65) || CHR( INT(RAND()*26) + 65) || CHR( INT(RAND()*26) + 65) || CHR( INT(RAND()*26) + 65) ||
CHR( INT(RAND()*26) + 65) || CHR( INT(RAND()*26) + 65)
from SOMETABLE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment