|
|
|
|
-
Adam Tokarski Liked 1 Years ago through Blogs | 1 Point
As we know that, No order guaranteed if order by is notf explcitly specified. Below is one more example of this.
Below is the code to pupolate dummy table.
If OBJECT_ID('dbo.testTable') is not null
drop table dbo.testTable
Go
Create table dbo.te...
|
-
Adam Tokarski refreshed 1 Years ago through Blogs | 1 Point
As we know that, No order guaranteed if order by is notf explcitly specified. Below is one more example of this.
Below is the code to pupolate dummy table.
If OBJECT_ID('dbo.testTable') is not null
drop table dbo.testTable
Go
Create table dbo.te...
|
|
|
|
|
|
|
-
Adam Tokarski Commented 1 Years ago through Blogs | 1 Point
@Frédéric Brouard: thanks for checking this checksum.
Does 'can cause collisions' mean that it may be not unique? Did you found these collisions during your testing?...
|
-
Adam Tokarski Commented 1 Years ago through Blogs | 1 Point
It was already raised as suggestion:
http://connect.microsoft.com/SQLServer/feedback/details/299229/change-unique-constraint-to-allow-multiple-null-values#...
|
-
Adam Tokarski Liked 1 Years ago through Blogs | 1 Point
Run the following code
declare @t table(i int unique)
insert into @t
select 1 union all
select null union all
select null
You will get the following error
Msg 2627, Level 14, State 1, Line 3
Violation of UNIQUE KEY constraint 'UQ__#A9...
|
-
Adam Tokarski Commented 1 Years ago through Blogs | 1 Point
The answer is, *It is because that NULL values cannot be eaqual to each other*.
That means that server is not able to distinguish these values so it treats them as one value....
|