SELECT * FROM SYSIBM.SYSTABLES OR SELECT * FROM SYSCAT.TABLES.

The first select statement will also show views.
-----Original Message-----
From: Alarion <[EMAIL PROTECTED]>
To: 'Scott Fletcher' <[EMAIL PROTECTED]>; [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
Date: Wednesday, January 24, 2001 11:23 AM
Subject: RE: [PHP-DB] Viewing the DB


>This was taken from one of the doc's on IBM's site:
>
>SYSTABLES contains a row for every table and view in the SQL collection. It
>tells you if the object is a table or view, the object name, the owner of
>the object, what SQL collection it is in, and so forth.
>The following sample statement displays information for the
>CORPDATA.DEPARTMENT table:
>  SELECT *
>    FROM CORPDATA.SYSTABLES
>    WHERE NAME = 'DEPARTMENT'
>
>so a "select * from <schema>.systables" should get you a list of all table
>names (theoretically) ;P
>
>Sean
>
>-----Original Message-----
>From: Scott Fletcher [SMTP:[EMAIL PROTECTED]]
>Sent: Wednesday, January 24, 2001 3:48 PM
>To: [EMAIL PROTECTED]
>Subject: Re: [PHP-DB] Viewing the DB
>
>I'm using IBM DB2.  No Oracle, No mySQL.
>
>Scott
>""Scott Fletcher"" <[EMAIL PROTECTED]> wrote in message
>94mt56$skf$[EMAIL PROTECTED]">news:94mt56$skf$[EMAIL PROTECTED]...
>> Does anyone know what is the sql command that would allow me to view all
>of
>> the tables in the database?
>>
>> Scott
>>
>>
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>>
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to