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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-12-30 : 12:10:53
|
| sudheer writes "here i am giving one oracle query, now i want eqivalent query for this.select * from Accounts where rownum >=5 and rownum <=10;" |
|
|
ehorn
Master Smack Fu Yak Hacker
1632 Posts |
|
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2003-12-30 : 12:31:47
|
quote: Originally posted by AskSQLTeam sudheer writes "here i am giving one oracle query, now i want eqivalent query for this.select * from Accounts where rownum >=5 and rownum <=10;"
Just a quick note, you can't have a query in Oracle selecting > rownum. Rownum is a pseudo column attached to the resultset of a query. Because of this, you can only use <, <= or =.To answer your question, there is no equivalent in SQL Server. However, SELECT TOP can accomplish much of what people use the rownum capability in Oracle for.-ec |
 |
|
|
|
|
|