Plz help with checking if database has any information..

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
runelore
Forum Commoner
Posts: 25
Joined: Thu Aug 22, 2002 10:14 am

Plz help with checking if database has any information..

Post by runelore »

Hi i wanna be able to check if there are any entres at all in the entire database. What i mean is that I have a database with quite a few tables. I need a way to just check if any information is stored in any of the fields in any of the tables within that database. I know it doesn't work but something like :

Code: Select all

Select * from 'database'
Would be perfect but i know I cant do that, can anyone help. please... Thank you....
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

could probably try: SELECT * FROM *

but i've never done that and personally dont think SQL lets you link tables so easily. But give it a shot!
fractalvibes
Forum Contributor
Posts: 335
Joined: Thu Sep 26, 2002 6:14 pm
Location: Waco, Texas

Post by fractalvibes »

Perhaps try a few queries against some of the tables and see if you get any results....

If your database has a catalogue you might could query directly against it,
i.e. the metadata regarding the database and get an answer there.

Phil J.
Post Reply