Re: All table names
| From: | Pablo DallOglio | Date: | Thu, 25 Oct 2001 12:25:37 +0000 |
| Subject: | Re: All table names | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-424@lists.php.net to get a copy of this message | ||
&excuse me, change oracle by sybase
On Thu, 25 Oct 2001 09:14:08 -0300
Pablo DallOglio <pablo@univates.br> wrote:
> But I need only table names...
> It Would be
>
> select name from sysobjects ???
>
> sysobjects.type='U' // means user tables ???
>
> I never worked with oracle.
>
> On Thu, 25 Oct 2001 01:10:26 -0400 (EDT)
> "Andrew M. Yochum" <andrew@digitalpulp.com> wrote:
>
> > This should give you a start for Sybase... this will give tables and column metadata:
> > select
> > sysobjects.id,
> > sysobjects.name,
> > syscolumns.name as colname,
> > systypes.name as typename,
> > syscolumns.length,
> > syscolumns.status
> > from
> > sysobjects,
> > syscolumns,
> > systypes
> > where
> > sysobjects.type = 'U'
> > and
> > syscolumns.id = sysobjects.id
> > and
> > systypes.usertype = syscolumns.usertype
> > order by
> > sysobjects.name,
> > syscolumns.name
> >
> > On Thu, 25 Oct 2001, Tomas V.V.Cox wrote:
> >
> > > Joao Prado Maia wrote:
> > > >
> > > > On Wed, 24 Oct 2001, Pablo DallOglio wrote:
> > > >
> > > > > Anyone knows how do I get all table names of database using Pear::DB ?
> > > > >
> > > >
> > > > Just run a query for 'SHOW TABLES' on MySQL for instance. Every
> > > > Database
> > > > has its own way to show this information, so I guess it could be possible
> > > > to add code on every driver for a 'showTables()' method.
> > > >
> > > > I'm not sure if this is desired though. Is PEAR::DB objective to do
> > > > everything for the user of the class ? If so, this would be a good
> > > > addition IMO.
> > > >
> > >
> > > Sure, it would be a great contribution. Let's take a look at Metabase or
> > > ADODB? ;-)
> > >
> > > Directly from phplib sources:
> > > Oracle: SELECT table_name,tablespace_name FROM user_tables
> > > PostgreSQL: select relname from pg_class where relkind = 'r' and not
> > > relname like 'pg_%'
> > >
> > >
> > > Tomas V.V.Cox
> > >
> > >
> >
> >
> > --
> > Andrew Yochum
> > Digital Pulp, Inc.
> > 212-679-0676x255
> >
> >
> >
> > --
> > PEAR General Mailing List (http://pear.php.net/)
> > To unsubscribe, e-mail: pear-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: pear-general-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
> --
> Pablo Dall'Oglio
> Linux User n. 223253
>
> --
> PEAR General Mailing List (http://pear.php.net/)
> To unsubscribe, e-mail: pear-general-unsubscribe@lists.php.net
> For additional commands, e-mail: pear-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Pablo Dall'Oglio
Linux User n. 223253