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 > ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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? |