In SQL Server you can use the TOP keyword to limit the number of rows
returned in a query.
select top 100 name,phone from customers where state like 'ga%'
I'm not sure how to do the between 10 and 20 bit but these things are all
unique per database engine. Your best bet is to limit the total number of
records returned from the database to the JSP/bean/servlet using something
like top for SQL Server or rowcount for Oracle. AltaVista and other search
engines limit the user to 200 total records and I think that is reasonable
for the average end-user of most applications. Once you have the 200 records
loaded into a Vector holding an array to represent the columns you can
create a UI that displays the first 10 records to the user and then offer
next 10 and prev 10 options that "page" through the vector.
Burr
[EMAIL PROTECTED]
----- Original Message -----
From: Marco <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 20, 2000 2:22 PM
Subject: Re: JSP page that display 10 result...
> Thanx but this SQL query can work with SQL Server or mySQL???
> i didn't find any help about rowcount in SQL Server.....
> Thanx marco
>
>
>
> > In your query use "rowcount"
> >
> > i.e.
> >
> > 1st query "SELECT * FROM table rowcount < 11";
> > 2nd query "SELECT * FROM table rowcount > 10 AND rowcount < 21";
> > etc...
> >
> > --
> > Antonio W. Lagnada
> > Ecommerce Consultant
> > [EMAIL PROTECTED]
> >
> > This email address is specifically
> > for JSP-Interest email list.
> > Remove _NOSPAM for the actual email.
> >
> >
> >
> > ---- Marco <[EMAIL PROTECTED]> wrote:
> > > How to make a JSP page that display 10 result (from a DB) per time
> > > and after
> > > with a next and prev link going forward the result??
> > > Can anyone explain me to this??
> > > Ca i have a code that explain this???
> > > Thanx in advance...
> > > marks
> > >
> > >
>
===========================================================================
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > > Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > > http://java.sun.com/products/jsp/faq.html
> > > http://www.esperanto.org.nz/jsp/jspfaq.html
> > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> > >
> >
> > ___________________________________________________________________
> > To get your own FREE ZDNet Onebox - FREE voicemail, email, and fax,
> > all in one place - sign up today at http://www.zdnetonebox.com
> >
> >
>
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets