in reply to Empty Set

Maybe a little simpler (and optimized on many databases) is
my $query = "SELECT count(*) FROM table";
This will return true if there are any rows of any kind in the table.

Gary Blackburn
Trained Killer