There's a general solution you can use to create a string of
any number of random digits (or characters, for that matter). Adapt the following pseudo-code to SQL syntax:
for a random string of
'n' characters numbers:
char array(n+1) storage;
storage = '';
for(i=0; i< n; i++)
storage = storage + concatenate( random_value('0' through '9'));
Depending upon your language, you may wish to generate values of 0 through nine and add to the '0' character before concatenation or range your values so that they are generated in that (ASCII) range. The number will likely need to be cast as a character type to append in any typed language.
Recall that storing a 23 digit value as an integer is likely to be a problem - so it's stored as a character string. Because of that, if you wish to be able to sort them by value, you must allow for leading '0' character - or sort by length, then value.