[odb-users] How does one select the TOP N rows from a table
using ODB?
PrinceToad
princetoad at 126.com
Wed Apr 11 05:35:13 EDT 2012
This may works for MySQL
but MS SQL Server doesn't support keyword LIMIT, which has only keyword TOP and is just after the position of SELECT .
such as:
select TOP N * from footable
At 2012-04-11 16:17:06,"Nicolas ALBEZA" <n.albeza at gmail.com> wrote:
The only way i've found is along the lines of :
result r = db.query<Foo>(FooQuery::bar == 42 + " ORDER BY baz LIMIT 10");
But maybe Boris will be able to help you more =p
Le 11 avril 2012 05:10, PrinceToad <princetoad at 126.com> a écrit :
I'm using SQL Server, and I'd like to select top N rows from a certain table.
How can I achieve this using ODB?
--
ALBEZA "Pause" Nicolas
More information about the odb-users
mailing list