我是一个完整的 mySQL 新手,但我不知道如何搜索这个问题的答案,所以我把它带到这里:
DESCRIBE rParam;
+----------------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+---------------+------+-----+---------+-------+
| p | float | YES | | NULL | |
| d | float | YES | | NULL | |
| LTP | float | YES | | NULL | |
| LTD | float | YES | | NULL | |
| alpha | float | YES | | NULL | |
| N | smallint(6) | YES | | NULL | |
| g | float | YES | | NULL | |
| a | float | YES | | NULL | |
| seed | float | YES | | NULL | |
| startingWeight | float | YES | | NULL | |
| path | varchar(1000) | YES | UNI | NULL | |
| type | varchar(100) | YES | | NULL | |
+----------------+---------------+------+-----+---------+-------+
12 rows in set (0.00 sec)
SELECT p FROM rParam GROUP BY p;
+--------+
| p |
+--------+
| 0 |
| 0.001 |
| 0.002 |
| 0.003 |
| 0.004 |
| 0.005 |
| 0.0075 |
| 0.008 |
| 0.01 |
| 0.012 |
| 0.0125 |
| 0.014 |
| 0.015 |
| 0.02 |
| 0.025 |
| 0.03 |
| 0.035 |
| 0.04 |
| 0.05 |
| 0.1 |
| 0.2 |
| 0.3 |
| 0.4 |
| 0.5 |
| 0.6 |
| 0.7 |
+--------+
26 rows in set (0.00 sec)
我可以获得一种查询的结果:
SELECT p FROM rParam WHERE p=0.5 GROUP BY p;
+------+
| p |
+------+
| 0.5 |
+------+
1 row in set (0.00 sec)
但是,更改我要求的 p 值:
SELECT p FROM rParam WHERE p=0.6 GROUP BY p;
Empty set (0.00 sec)
但是我们可以从第一个输出中清楚地看到有 p=0.6 的行?这是大多数 p 值的问题 - 为什么 mySQL 返回空集?