Обсуждение: Test if a table is present

Поиск
Список
Период
Сортировка

Test if a table is present

От
"Ole Ekerhovd"
Дата:
How can I test if a table is present in database?
 
Regards,
Ole

Re: Test if a table is present

От
"Anoop G"
Дата:
<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

От
Volkan YAZICI
Дата:
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.