Is there a way to determine wether a table is empty (0 rows) or not, whithout first doing a query which you don't need the results from?
I use Postgres.
In fact, maybe this is also usefull, I want to copy a table with all of its contents into another table. I use
"create table new_table as select * from old_table"
It works, unless the old_table has 0 records. It just does nothing. No new table, no error message, nothing. How can I solve this?