查询以选择不同的记录 [英] query to select distinct records

查看:44
本文介绍了查询以选择不同的记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的桌子看起来像这样

AUTO_ID TIME_STAMP纬度经度

1 2:30:00 AM 16.001 78.37437
2 2:31:00 AM 16.001 78.37437
3 2:32:00 AM 17.121 80.74358
4 2:33:00 AM 12.101 89.79658
5 2:34:00 AM 13.211 45.45454
6 2:35:00 AM 13.211 45.45454


我想从上表中选择不同的纬度和经度

所以建议我

解决方案

尝试这个

 选择纬度,经度来自表名

问候,
Bluesathish


  SELECT   DISTINCT 纬度,经度
 FROM   


会选择不同的lat-long的 couple


my table looks like this

AUTO_ID TIME_STAMP LATITUDE LONGITUDE

1 2:30:00AM 16.001 78.37437
2 2:31:00AM 16.001 78.37437
3 2:32:00AM 17.121 80.74358
4 2:33:00AM 12.101 89.79658
5 2:34:00AM 13.211 45.45454
6 2:35:00AM 13.211 45.45454


i want to select distinct latitude and longitude from the above table

so please suggest me

解决方案

try this one

select latitude , longitude from tablename group by latitude,longitude



Regards,
Bluesathish


SELECT DISTINCT latitude, longitude
FROM Table


that will select distinct couple of lat-long


这篇关于查询以选择不同的记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆