RE: Re: How to Count(*) with LIMIT

2002-05-02 Thread domi
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

Re: Re: How to Count(*) with LIMIT

2002-05-02 Thread Egor Egorov
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 to

RE: Re: How to Count(*) with LIMIT

2002-05-02 Thread mos
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: SELECT

RE: Re: How to Count(*) with LIMIT

2002-05-02 Thread Svensson, B.A.T. (HKG)
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...

Re: Re: How to Count(*) with LIMIT

2002-05-02 Thread Ryan Fox
- 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 returned by the

Re: Re: How to Count(*) with LIMIT

2002-05-02 Thread Jeff Kilbride
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 originally