Getting info about db columns

2005-01-12 Thread Dave Merrill
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 a number of different tables. I'm also interested in getting a list of the tables in a db.

Re: Getting info about db columns

2005-01-12 Thread SGreen
May I introduce you to the family of SHOW commands? SHOW DATABASES - lists all databases on a server SHOW TABLES - lists all tables within your current database SHOW CREATE TABLE x - returns a table containing a SQL statement you could use to recreate the table x if you needed to

Re: Getting info about db columns

2005-01-12 Thread Rhino
approve of having to write applications to get this sort of information, Shawn's approaches are going to be better for you ;-) Rhino - Original Message - From: Dave Merrill [EMAIL PROTECTED] To: MySql mysql@lists.mysql.com Sent: Wednesday, January 12, 2005 4:07 PM Subject: Getting info about

RE: Getting info about db columns

2005-01-12 Thread Dave Merrill
[Sending this to this list, just for general reference, since I didn't notice that Reply on this list goes to the poster, not the list. No other list I'm on works that way, so I plead Failure To Open Eyes.] Dave Merrill Dave Merrill wrote on 01/12/2005 04:56:34 PM: Thanks Shawn, looks like

Re: Getting info about db columns

2005-01-12 Thread Peter Brawley
SHOW TABLES lists tables in a db DESCRIBE tablename (= SHOW CREATE TABLE tablename) outputs column info, but your application will have to parse it. EXPLAIN is for query optimisation analysis, not table column listings. The manual's pretty clear on these topics. PB - Dave Merrill wrote: Hi,