How to generate 6-digit unique numbers in C# or SQL Server?
<p>I want to generate 6-digit unique random numbers for my Users table. This unique code is different from table primary key. It should not be sequential and must be in 6-digit format. I have to ignore numbers like 111111, 222222, ...</p>

<p>I can use the Random() class in C# to generate it but the uniqueness is the key.</p>

<p>Is there any solution to do it in C# (or in SQL Server)?</p>