Subject | RE: [ib-support] How can I cjeck if a table is empty? |
---|---|
Author | PODESTA Mariano APRE |
Post date | 2003-05-06T14:38:39Z |
try
if (exists (select * from MyTable)) then
..
this statement is fast and does not fetch all records.
if (exists (select * from MyTable)) then
..
this statement is fast and does not fetch all records.
> -----Original Message-----
> From: PUB: mcrosman1957 [mailto:delphi7@...]
> Sent: Domingo, 04 de Mayo (5) del 2003 14:22
> To: ib-support@yahoogroups.com
> Subject: [ib-support] How can I cjeck if a table is empty?
>
>
> Hi,
>
> I am using InterBase 6.0.2.
>
> How can I check if a table is empty?
>
> I have a table named MyTable with a field named XXX.
>
> I have been using the instruction below to check if MyTable is empty
> or not:
>
>
> "Select Count(XXX) as NumRecords from MyTable"
>
>
> If NumRecords = 0 then MyTable is empty.
>
>
> Is there another way to do check if a table is empty?
>
> Thanks for any help.
>
> Best regards,
>
> Marcelo C. Rosman
>
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~-->
> Make Money Online Auctions! Make $500.00 or We Will Give You
> Thirty Dollars for Trying!
> http://us.click.yahoo.com/KXUxcA/fNtFAA/uetFAA/67folB/TM
> --------------------------------------------------------------
> -------~->
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>