Programming convention has always been that base random functions generate a random number as a decimal (or float) between 0 and 1(exclusive of 1).
If you want an integer random number you multiply by the random number by the integer spread, take the floor to convert to an integer and add the lowest integer to get a range of integer random numbers between a (inclusive) and b (exclusive).
integer_random_number = a + floor(random() * (b - a))
If you know the number of rows in your table you can then use that formula in a math node with b= number of rows and a=0 to generate an integer random number.
We have conventions, based on hard earned experience over many years, so that we make fewer mistakes and it is easier to share and understand each others code. It may seem frustrating at first, but becomes easier with time.
On your second point. Just generating a random identifier will not anonymise your table. You will need to sort it. In which case doing the sort first then adding a sequential number will achieve what you want.