我是关系数据库的新手......我想列出同一个数据库中许多表中的所有数据。
我有一个包含其他表名称的表。像这样:
mysql> select * from CarKeys;
+-------+
| Name |
+-------+
| Audi |
| Honda |
+-------+
mysql> select * from Audi;
+-------+---------+--------+
| Model | NumDoor | Colour |
+-------+---------+--------+
| A4 | 4 | White |
+-------+---------+--------+
mysql> select * from Honda;
+------------+---------+--------+
| Model | NumDoor | Colour |
+------------+---------+--------+
| Civic | 4 | White |
| Civic | 4 | White |
| HomdaModel | 5 | Red |
+------------+---------+--------+
select * from Honda
但现在,我不想单独打电话select * from Audi
。我想要一个命令将select * from
所有表命名为CarKeys
表
我试过这个:
SELECT * FROM (SELECT * FROM CarKeys);
但我收到一条错误消息:
ERROR 1248 (42000): Every derived table must have its own alias
如何获取此数据库中所有表的所有信息?我正在使用的模式的名称是WebApp