** !17数据库字段为 float 类型且建表时未指定精度,可以考虑使用 fromat 来查询,不然的话可能会漏掉一些数据行。!**
select device_id, gender, age, university, gpa
from user_profile
where gender = 'male' and format(gpa, 1) >= 3.5;
select device_id, gender, age, university, gpa from user_profile where gender = 'male' and format(gpa, 1) >= 3.5;
学习链接:
** !17 1、MySQL工作笔记-建表时为Float型数据确定精度,查询时精度显示,多列之和查询!**
https://blog.csdn.net/qq78442761/article/details/89356328
2、Mysql数据库详解(看B站狂神mysql记得课后笔记)
https://blog.csdn.net/a951273629/article/details/107094285