我全心全意是我的我的SQL新bie,但我不知道如何寻找答案,因此我为什么要在这里:
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)
然而,改变我所要求的价值:
SELECT p FROM rParam WHERE p=0.6 GROUP BY p;
Empty set (0.00 sec)
但我们可以从第一个产出中清楚地看到,有几行,p=0.6? 这对大多数珍贵阶层来说是一个问题——为什么我的SQL回了空套?