UPDATE [dbo].[my_table] SET [my_table].test_rand=T.randNum
UPDATE
[dbo].[my_table]
SET
[my_table].test_rand=T.randNum
FROM
(
SELECT
id,
CAST
(RAND(CHECKSUM(NEWID())) * 1000000
AS
INT
)
randNum
[my_table].test_rand
)T
WHERE
[dbo].[my_table].id = T.id