SQL CE 3.5 and the ‘SELECT TOP’ Query

Posted by stevewarren on ASP.net Weblogs See other posts from ASP.net Weblogs or by stevewarren
Published on Thu, 27 May 2010 03:45:24 GMT Indexed on 2010/05/27 5:52 UTC
Read the original article Hit count: 350

Filed under:

Finally! SQL CE 3.5 now supports the ‘TOP’ keyword. However, there is a trick to this: you must surround the number with parenthesis.

For example, in regular T-SQL you would write

SELECT TOP N [col] FROM [table]

However, in SQL CE 3.5 you must write

SELECT TOP (N) [col] FROM [table]

© ASP.net Weblogs or respective owner

Related posts about mobile