Re: Check if a table exists
Posted by: Bob Field ()
Date: August 27, 2006 09:17AM
I'm not sure what an Advantage database is, but you can query the INFORMATION_SCHEMA `tables` system view which returns a list of all tables on the server instance. You can narrow the select by specifying table_schema or table_name in your WHERE clause. There's any number of ways to code this statement. Here is one example:
SELECT table_name FROM information_schema.tables WHERE table_schema = 'databasename' AND table_name = 'tablename';If no rows are returned, the table does not exist.
|Check if a table exists||132167||Alexandre Lu||08/24/2006 09:12AM|
|Re: Check if a table exists||71177||Bob Field||08/27/2006 09:17AM|
|Re: Check if a table exists||44820||marc castrovinci||09/06/2006 12:36PM|
|Re: Check if a table exists||41491||Ekta Sharma||11/12/2006 11:44PM|
|Re: Check if a table exists||41021||Bob Field||11/13/2006 09:05AM|
|Re: Check if a table exists||46720||kamiar kanani||01/11/2007 09:17AM|
|Re: Check if a table exists --> here is a function to use.||34621||jeff maass||07/19/2008 05:12PM|
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.