> That would give the correct result, but it would still physically count
all
> the rows in the table which takes too long. This code will execute every
> time a web page opens that has a grid. Some of the grid pages are quite
> large, > 1 million rows. The person who designed the web page origina
- Original Message -
From: "mos" <[EMAIL PROTECTED]>
> > > I have a Where clause like:
> > > select count(*) from table where LIMIT 100
> > > Unfortunately the Count(*) ignores the LIMIT clause entirely. Why?
>>
> >If You want to know the number of rows in the recordset retu
> I have a Where clause like:
> select count(*) from table where LIMIT 100
> Unfortunately the Count(*) ignores the LIMIT clause entirely. Why?
The answer is: Because the SQL query with COUNT(*) only returns one row...
-
At 03:48 AM 5/2/2002, you wrote:
> > I have a Where clause like:
> > select count(*) from table where LIMIT 100
> >
> > Unfortunately the Count(*) ignores the LIMIT clause entirely. Why?
> >
>
>Because the query returns only ONE row and LIMIT limits rows, not values.
>See ex. below
mos,
Thursday, May 02, 2002, 8:11:33 AM, you wrote:
m> I have a Where clause like:
m> select count(*) from table where LIMIT 100
m> Unfortunately the Count(*) ignores the LIMIT clause entirely. Why?
Because first of all SELECT is executed and then LIMIT is applied.
m> It seems t
> I have a Where clause like:
> select count(*) from table where LIMIT 100
>
> Unfortunately the Count(*) ignores the LIMIT clause entirely. Why?
>
Because the query returns only ONE row and LIMIT limits rows, not values.
See ex. below:
SELECT count(login) FROM accounts WHERE d