mysql数据库中有一条记录:
start_mark 和 end_mark 都是 float 类型字段
id | evaluation_content | start_mark | end_mark | score |
---|---|---|---|---|
162 | 600 | 0 | 10.9 | 12 |
SELECT
`evaluation_content_detail_standards`.*
FROM
`evaluation_content_detail_standards`
WHERE
`evaluation_content_detail_standards`.`evaluation_content_detail_id` = 600
AND (end_mark >= 10.9)
这样是查不到结果的
而:
SELECT
evaluation_content_detail_standards.
FROM
evaluation_content_detail_standards
WHERE
evaluation_content_detail_standards.evaluation_content_detail_id = 600
AND (abs(end_mark -10.9) >= 0)
这样是可以查到的
其实我们看到的end_mark
是10.9 ,可能它值为是小于10.9的只不过是进位变成10.9