SELECT Left(Cast(Cast(1000000 * Rand(Cast(NewId() as binary(16))) as int) as nvarchar) + '000000', 6)