Is there a LIMIT command in SQL?

Results 1 to 2 of 2

Thread: Is there a LIMIT command in SQL?

  1. #1
    Join Date
    Dec 1969

    Default Is there a LIMIT command in SQL?

    Is there a LIMIT command in SQL like there is in mySQL? In mySql, this allows me to bring up results from row x to row y, but in SQL, all I can find is TOP, where I can bring in the TOP x rows. I have nested TOP statments before, but this command does not work well when I try to join tables.

  2. #2
    Join Date
    Dec 1969

    Default Sure... the MySQL dialect of SQL there is!<BR><BR>After all, SQL is just a language, and there are various dialects of it, just as there are dialects of BASIC.<BR><BR>Now, did you mean *SQL Server*, which is an MS product?<BR><BR>If so, the answer is no. Unfortunately. I like that feature of MySQL, too. Easiest way to do paging there is in any DB!<BR><BR>With most DBs (SQL Server, Access, etc.), you have to use other techniques to do paging. Your nested TOP trick is one that others have suggested. I think that&#039;s the one that the ASPFAQ on "paging" links to. But, anyway, do follow the link from the ASPFAQs to see ways of doing what I think you are trying to do. Even though you can&#039;t do it pure SQL-Server SQL, the hybrid of ADO and the SQL Server driver can probably accomplish your needs.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts