Thread: Test if a table is present

Test if a table is present

From
"Ole Ekerhovd"
Date:
How can I test if a table is present in database?
 
Regards,
Ole

Re: Test if a table is present

From
"Anoop G"
Date:
<div dir="ltr"><br /><br />you can find it throuh a query like this <br /><br /><br />select tablename from pg_tables
wheretablename = 'tbl_updated_status_master';<br /><br />regards:<br /><br />Anoop<br /><br /></div> 

Re: Test if a table is present

From
Volkan YAZICI
Date:
On Sat, 26 Jul 2008, "Ole Ekerhovd" <olehare@online.no> writes:
> How can I test if a table is present in database?
 SELECT TRUE   FROM information_schema.tables  WHERE table_name   = '<TABLE>' AND        table_schema = '<SCHEMA>'

BTW, this query is portable across database systems supporting
information schema, which is an almost defacto standard.


Regards.