【发布时间】:2010-08-06 11:55:35
【问题描述】:
首先,我使用 readline 5.0 为 redhat-linux-gnu (x86_64) 运行 mysql Ver 14.12 Distrib 5.0.45
对不起,我无法复制它,所以我必须输入它。
有问题的两个字段如下
id int(11)
startj1950 decimal(38,6)
mysql> select id,startj1950 from store where id = 32513;
+------------------+
| id | startj1950 |
+----------|----------------------|
|32513 | 1912181654.500000 |
-----------------------------------
mysql> select id from store where startj1950=1912181654.500000;
Empty set
所以我认为我在副本中搞砸了,所以我会让 mysql 为我获取价值。
mysql> select id from store where startj1950=(select startj1950 from store where id=32513);
Empty set <br/>
但它适用于其他结果
mysql> select id,startj1950 from store where id = 32513;
+------------------+
| id | startj1950 |
+----------|----------------------|
|18675 | 1907365784.570000 |
-----------------------------------
mysql> select id from store where startj1950=1907365784.570000;
+----------+
| id |
+----------|
|18675 |
------------
mysql> select id from store where startj1950=(select startj1950 from store where id=18675);<br/>
+----------+
| id |
+----------|
|18675 |
------------
我想我要么遇到了 mysql 错误,要么我误解了某种概念。提前感谢您的帮助。
【问题讨论】:
标签: mysql