Re: Retrieving Database Table Names

From: Date: Thu, 18 Sep 2003 13:13:44 +0000
Subject: Re: Retrieving Database Table Names
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-21424@lists.php.net to get a copy of this message
On Thu, 18 Sep 2003, Herhuth, Ron wrote: The database that you're looking at should have a table called sysobjects. I'd get everything in that table where xtype = U (I think) > > I am trying to build a dynamic database map that will return a page that > shows each Table in the database along with the Column names and the > datatype of each column in a rather large Microsoft SQL Server database. > I know how to extract the column names for the tables, as well as the > datatypes of the column...but for the life of me I can't figure out the > SQL query to use to retrieve a list of the tables a database contains. It > is important that the script be able to account for changes to the > database. > > Does anyone know the SQL to extract the user created tables in a MSSQL > database? > > Thanks, > Ron > >

« previous php.windows (#21424) next »