mysql> use test; Database changed mysql> show tables; +-------------------------+ | Tables_in_test | +-------------------------+ | arc | | book | | char_test | ... +-------------------------+ 24 rows in set (0.16 sec)mysql> show columns from arc; +-------+---------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+---------+------+-----+---------+----------------+ | Id | int(11) | NO | PRI | NULL | auto_increment | | name | int(11) | NO | | 0 | | +-------+---------+------+-----+---------+----------------+ 2 rows in set (0.04 sec)
SELECT `TABLES`.`TABLE_SCHEMA`, `TABLES`.`TABLE_NAME` FROM `information_schema`.`TABLES` WHERE `TABLES`.`TABLE_TYPE` = 'base table';SELECT * FROM `information_schema`.`COLUMNS` where `TABLE_SCHEMA`='test' and `TABLE_NAME`='arc' order by `ORDINAL_POSITION`;
Database changed
mysql> show tables;
+-------------------------+
| Tables_in_test |
+-------------------------+
| arc |
| book |
| char_test |
...
+-------------------------+
24 rows in set (0.16 sec)mysql> show columns from arc;
+-------+---------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+----------------+
| Id | int(11) | NO | PRI | NULL | auto_increment |
| name | int(11) | NO | | 0 | |
+-------+---------+------+-----+---------+----------------+
2 rows in set (0.04 sec)
SELECT
`TABLES`.`TABLE_SCHEMA`, `TABLES`.`TABLE_NAME`
FROM
`information_schema`.`TABLES`
WHERE
`TABLES`.`TABLE_TYPE` = 'base table';SELECT *
FROM
`information_schema`.`COLUMNS` where `TABLE_SCHEMA`='test' and `TABLE_NAME`='arc' order by `ORDINAL_POSITION`;
mysql>show tables;