Re: SQL problem
Posted in 1998
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
Siebe de Klaver wrote:
>
> Hello All,
>
> I'm using informix-esql/c.
>
> problem : I want to know the number of rows a select statement returns.
[SNIP]
> Any suggestions ?
You are missing the obvious:
SELECT COUNT(*) FROM ...
Using the same FROM and WHERE clauses. For many multi-table joins you
may be able to identify one table and its filter clauses as defining
the number of rows that will be returned and can therefore simplify
the count(*) statements so it runs faster.
Art S. Kagel