Subject Re: [ib-support] How can I check if a table is empty?
Author Helen Borrie
At 10:06 PM 6/05/2003 -0600, you wrote:
>if so .. check timing difference between
>
>IF (EXISTS (Select * from MyTable)) THEN ...
> and
>IF (EXISTS (Select first 1 * from MyTable)) THEN ...
>
>----- Original Message -----
>From: "Albert L." <looks@...>
>To: <ib-support@yahoogroups.com>
>Sent: Tuesday, May 06, 2003 12:49 AM
>Subject: Re: [ib-support] How can I check if a table is empty?
>
>
> > Isn't SELECT * returns everything, and when applied to large table,
> > introduce much overheads ?
> >
> > Pls correct me if I'm wrong. I always think this is the case.

It's wrong. Exists(select..) doesn't return any rows at all.

heLen