Skip to main content

All Questions

Filter by
Sorted by
Tagged with
4 votes
1 answer
209 views

Why does querying for records that violate a foreign key return incorrect results?

While doing some pre-checking on a table before adding a new Foreign Key, we were querying to see how many current rows would violate the new key. This is a fairly active database with near constant ...
Bensonius's user avatar
  • 143
9 votes
2 answers
21k views

How Uniqueidentifier in SQL Server is always a unique value globally?

As per microsoft documentation on UniqueIdentifier, This value is always a unique globally beacuse it's based on network clock and CPU clock time and on the other hand the same documentation says ...
Vishwanath Dalvi's user avatar
6 votes
2 answers
2k views

SQL Server: Create New GUID Values for Existing Index

I have an existing table with about 6 million rows. The relevant columns are: ID int not null PK Key uniqueidentifier not null Read/write on this table by Key lookup is probably something like 100 ...
ulty4life's user avatar
  • 161
17 votes
3 answers
9k views

Securely generate a UNIQUEIDENTIFIER in SQL Server

I intend to be using a UNIQUEIDENTIFIER as an access key that users can use to access certain data. The key will act as a password in that sense. I need to generate multiple such identifiers as part ...
usr's user avatar
  • 7,360