Re: All table names

From: Date: Thu, 25 Oct 2001 13:52:31 +0000
Subject: Re: All table names
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-427@lists.php.net to get a copy of this message
The Sybase query will work for MSSQL too... you can knock that off your list. On Thu, 25 Oct 2001, Pablo DallOglio wrote: > Now I still need to know table names on: > > FrontBase > InterBase > mssql > msql > > On Thu, 25 Oct 2001 09:39:22 -0400 (EDT) > "Andrew M. Yochum" <andrew@digitalpulp.com> wrote: > > > Yes. Type has a variety of possible values... These are the ones you might > > be insterested in: > > > > 'S': System Table > > 'U': User table > > 'V': View > > > > So: select name from sysobjects where type = 'U' > > is what you want. > > > > And... the same query should also work for MS SQL Server. > > > > > > > > On Thu, 25 Oct 2001, Pablo DallOglio wrote: > > > > > &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 > > > > > > > > > > > > > -- > > Andrew Yochum > > Digital Pulp, Inc. > > 212.679.0676x255 > > andrew@digitalpulp.com > > > > > > -- > > 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 > > > -- Andrew Yochum Digital Pulp, Inc. 212.679.0676x255 andrew@digitalpulp.com

« previous php.pear.general (#427) next »