In SQL 2008
update top (100) MyTable
set MyField = cast(cast(crypt_gen_random(1) as int) * 100.0 / 256 as int)
I believe the same will work in SQL 2005.
[change]
If it does not work in SQL 2005, you can do this:
update top (100) MyTable
set MyField = abs(cast(newid() as binary(6)) % 100)
source
share