Re: SQL Mysql - Informix
| From: | Dan Fitzpatrick | Date: | Sun, 18 Mar 2001 02:26:42 +0000 |
| Subject: | Re: SQL Mysql - Informix | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-7571@lists.php.net to get a copy of this message | ||
Jon,
Try the following:
Use the sysmaster DB. Then:
SELECT tabname
FROM systabnames
WHERE dbsname = '$your_db_name'
[ AND owner <> 'informix' ] <- Assuming you were not logged in as
informix when you created the tables
[ AND tabname NOT LIKE ' %' ] <- If you use blobs you may have some
numeric tables I think
The stuff in the square brakets is optional. Informix throughs in a lot
of system tables and hidden tables.
The systabnames table is in the sysmaster database and has the following
fields:
partnum, dbsname, owner, tabname, collate
Hope this helps.
Dan
> Any idea how to extract table names for a database in informix - like the
> sql for mysql SHOW TABLES;
>
> ??
>
> J