Is it on insert, or to update an existing table?
Assuming for an insert you could use something like this.
INSERT INTO someTable (aField, aNotherField, SomeNumber)
SELECT 'aFieldValue', 'aNotherField', aNum
FROM (SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum
UNION SELECT ROUND(RAND() * 899999) + 100000 AS aNum) Sub1
LEFT JOIN someTable ON Sub1.aNum = someTable.SomeNumber
WHERE someTable.SomeNumber IS NULL
LIMIT 1
This is generating 10 random numbers between 100000 and 999999, and picking one that hasn't already been used.
It is a pretty nasty way of doing this, and has the obvious major flaw that all 10 numbers generated could have already been used.
I would be inclined to suggest that the need for a random number can likely be avoided.