The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Lee Dumond (29) [Avatar] Offline
#1
On Page 216, it shows the SQL query which is executed against the database as a result of running the Listing 6.8 / 6.9 example:

SELECT TOP 2 [t1].[Title], [t1].[Price] ... <snip>

However, the SQL that is actually being generated by these listings appears to be slightly different, as follows:

SELECT [t1].[Title], [t1].[Price]
FROM (
SELECT ROW_NUMBER() OVER (ORDER BY [t0].[Title], [t0].[Price]) AS [ROW_NUMBER], [t0].[Title], [t0].[Price]
FROM [dbo].[Book] AS [t0]
) AS [t1]
WHERE [t1].[ROW_NUMBER] BETWEEN @p0 + 1 AND @p0 + @p1
ORDER BY [t1].[ROW_NUMBER]
fabrice.marguerie (224) [Avatar] Offline
#2
Re: Possible error on page 216?
Added to the errata.
Thanks.