Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Random 10 Char Values
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01017716
Message ID:
01017730
Views:
23
Hi,

> does this code will not return duplicate? just like sys(2015) w/c is base on time? I want to put it on a unique field.

Yes, it does return duplicate values. If you need a unique value, you can use NEWID(). This value is virtually guaranteed to be unique. However, it's more than 10 characters long (36 precisely). You can reduce it to 32 characters if you remove the "-", or 16 bytes if you use a uniqueidentifier field type which stores the same value in binary format.
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform