Unix Technical Forum

get all the columns on all the tables in information_schema

This is a discussion on get all the columns on all the tables in information_schema within the MySQL forums, part of the Database Server Software category; --> On 28 May, 00:58, JRough <jlro...@yahoo.com> wrote: > I am writing this query in PHPAdmin on the information_schema > ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #21 (permalink)  
Old 06-02-2008, 12:34 PM
Captain Paralytic
 
Posts: n/a
Default Re: get all the columns on all the tables in information_schema

On 28 May, 00:58, JRough <jlro...@yahoo.com> wrote:
> I am writing this query in PHPAdmin on the information_schema
> database. I want to get the column names from all the tables. I can
> figure out how to write the query for one table at a time. To save
> time I would like to write it on all the tables but when I add tables
> separated by a comma I get an error.
>
> tia,
>
> ----------------SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE,
> COLUMN_DEFAULT
> FROM INFORMATION_SCHEMA.COLUMNS
> WHERE table_name = 'table1', 'table2'
> AND table_schema = 'myDatabase'


Instead of trying to play with the INFORMATION_SCHEMA tables, since
you have no knowledge of SQL, why not use the SHOW commands (the
natural partner for the CREATE & ALTER commands) which together make
up the proper way to interact with INFORMATION_SCHEMA?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:03 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com