如果你一定要查可以用 select a.sj,a.jd,a.wd,a.data,b.jd,b.wd from yourtable a,yourtable b where abs(cast(b.jd as int)-cast(a.jd))<1 and abs(cast(b.wd as int)-cast(a.jd))<1
select a.sj,a.jd,a.wd,a.data,b.jd,b.wd from yourtable a,yourtable b where abs(cast(b.jd as int)-cast(a.jd as int))<1 and abs(cast(b.wd as int)-cast(a.wd as int))<1这个查询中肯定会有记录本身和记录本身相减,如果你的表中有唯一标识记录的字段如id,那就可以写成select a.sj,a.jd,a.wd,a.data,b.jd,b.wd from yourtable a,yourtable b where abs(cast(b.jd as int)-cast(a.jd as int))<1 and abs(cast(b.wd as int)-cast(a.wd as int))<1 and a.id<>b.id
select a.sj,a.jd,a.wd,a.data,b.jd,b.wd from yourtable a,yourtable b where abs(cast(b.jd as int)-cast(a.jd))<1 and abs(cast(b.wd as int)-cast(a.jd))<1