List:General Discussion« Previous MessageNext Message »
From:Rhino Date:January 12 2005 9:44pm
Subject:Re: Getting info about db columns
View as plain text  
In addition to Shawn's suggestions, the other approach you could take would
be to write Java programs that make use of the DataBaseMetaData and
ResultSetMetaData interfaces. I've used this approach with success, although
not to any great extent yet.

Of course, if you don't know Java or don't approve of having to write
applications to get this sort of information, Shawn's approaches are going
to be better for you ;-)


----- Original Message ----- 
From: "Dave Merrill" <dmerrill@stripped>
To: "MySql" <mysql@stripped>
Sent: Wednesday, January 12, 2005 4:07 PM
Subject: Getting info about db columns

> Hi, mysql newb here, coming mostly from ms sql server.
> I'm wondering how to find out basic info (type, str length, column name if
> getting all cols from a list of tables, etc), about a set of columns from
> number of different tables. I'm also interested in getting a list of the
> tables in a db.
> SQL Server has a pair of views (information_schema.tables and
> information_schema.columns) that were useful for this kind of thing. Since
> they're normal views, you can restrict the tables or cols found by table,
> column, type, etc, and retrieve only the info you want about them;
> that works in a std query works here.
> The only way I know of to get this kind of metadata from mysql is explain,
> which appears to only return a fixed set of info about all the columns in
> single table. Is there any way to get:
> - A list of tables in a db
> - Column info for more than one table at once
> - Only certain info about these cols (name and type only, say)
> Thanks,
> Dave Merrill
> -- 
> MySQL General Mailing List
> For list archives:
> To unsubscribe:

Getting info about db columnsDave Merrill12 Jan
  • Re: Getting info about db columnsSGreen12 Jan
  • Re: Getting info about db columnsRhino12 Jan
  • Re: Getting info about db columnsPeter Brawley13 Jan
RE: Getting info about db columnsDave Merrill13 Jan