我在 phpMyAdmin 中使用 MySQL,我有一个表,我试图从中获得以下结果,如下图所示:
我有一个表 Rate 结构如下;
+---------+-----------+-------+--------+---------+----------+
| EntryID | RegDate | Code | Buying | Selling | Averages |
+---------+-----------+-------+--------+---------+----------+
| 1 |2013-11-08 | USD | NULL | NULL | 0.814 |
+---------+-----------+-------+--------+---------+----------+
| 2 |2013-11-08 | GBP | NULL | NULL | 0.114 |
+---------+-----------+-------+--------+---------+----------+
使用主键作为 EntryID 我试图获得如下所示的输出;
+-----------+-------+-------+
| RegDate | USD | GBP |
+-----------+-------+-------+
|2013-11-08 | 0.814 | 0.114 |
+---------+---------+-------+