drop table if exists gz_ads_schema.test;
create table gz_ads_schema.test(
zzzj bigint,
zdbh varchar(1000),
zdmc varchar(1000),
jd real,
wd real
);
insert into gz_ads_schema.test(zzzj, zdbh, zdmc, jd, wd) values (1,'G9478','海珠区赤岗街新鸿社区',113.3264,23.1033);
insert into gz_ads_schema.test(zzzj, zdbh, zdmc, jd, wd) values (2,'G1070','番禺区石壁街大洲村',113.326,23.103);
现在需要精确筛选113.326这一条数据
select
zzzj
,zdbh
,zdmc
,jd
,wd
from gz_ads_schema.test
where jd = 113.326::real;
结果图
相反,如果直接进行比较,会查不出结果
select
zzzj
,zdbh
,zdmc
,jd
,wd
from gz_ads_schema.test
where jd = 113.326;
结果2
网友评论