Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
toughgamer
Starting Member
4 Posts |
Posted - 2004-06-07 : 01:08:05
|
hi guys,i been working on php/mysql for about 4 years and recently i started learning asp.net with sql server/access.maybe this is a silly question but i found it real hard to select a certain number of rows in sql server, if anyone here ever tried mysql, u will possibly notice that it supports queries like 'select * from table_name LIMIT 1,10', well i couldnt find a "limit" key word in sql server, now i can only use "TOP" key word in sql server to try to do the same, like, 'select TOP 10 * from table_name where id>=1', while, it is not as simple.could anyone help? thnx |
|
timmy
Master Smack Fu Yak Hacker
1242 Posts |
Posted - 2004-06-07 : 01:49:18
|
TOP is the simplest way of doing this in SQL Server or Access.It's not any more complex - it's just a matter of getting used to the new syntax.btw - you shouldn't need the "where id >= 1" if you just want the first 10 rec's. Unless you want to filter out something, of course. |
 |
|
|
|
|