I believe this is specific to MS SQL server... unfortunately this row limiting is not part of standard sql.. so mysql has its "limit #", MS SQL Server has its "top #" and oracle has its "rownum" where clause.
-matt On Sat, 19 Jun 2004, Erin S wrote: > please pardon the question: i learned sql at work with m$ sql server... does > select top 10 * from tablename > not work with non-m$ sql servers? or is there some reason why nobody's using > it? > ~Erin > > > --- Matt Probst <[EMAIL PROTECTED]> wrote: > > ".... where rownum <= #" > > > > example: > > > > "select * from employees where nownum<=10 order by salary desc;" > > > > will return the 10 highest paid employees. > > > > -matt > > > > On Fri, 18 Jun 2004 [EMAIL PROTECTED] wrote: > > > > > on a mysql box I can limit the number of query results returned by tacking > > > a "LIMIT #" on the end of my query. That doesn't seem to work with the > > > Oracle 10G box I have. Is there a simple work-around? > > > > > > MRB > > > > > > > > > > > > ____________________ > > > BYU Unix Users Group > > > http://uug.byu.edu/ > > > ___________________________________________________________________ > > > List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list > > > > > > > ____________________ > > BYU Unix Users Group > > http://uug.byu.edu/ > > ___________________________________________________________________ > > List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list > > > > > ===== > ------------------------------------------------------------------------------------ > http://www.userfriendly.org > ------------------------------------------------------------------------------------ > > > > __________________________________ > Do you Yahoo!? > New and Improved Yahoo! Mail - Send 10MB messages! > http://promotions.yahoo.com/new_mail > > ____________________ > BYU Unix Users Group > http://uug.byu.edu/ > ___________________________________________________________________ > List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list > ____________________ BYU Unix Users Group http://uug.byu.edu/ ___________________________________________________________________ List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
