Which version of SQL Server are you using and what is the compatibility mode of the database? The VALUES clause was added in SQL Server 2008.
Note that I didn't say physical order, but rather physical access order. What I meant here is that the access depends on current data layout as well as optimization choices, both...
The article now contains the right link, which is: tsql.solidq.com/SampleDatabases/TSQLV4.zip.
Thanks for letting us know!
First, thanks for the feedback; it is much appreciated!
The val column shouldn’t be part of the key list of the clustered primary key. From a logical, data model...
Nice solution! I especially like its simplicity and brevity.
Not sure why my solution doesn't terminate on your machine. I just ran both yours and mine on my [6 year-old]...