我的sql是:
SELECT * FROM stores ORDER BY ST_Distance(location,Point(0,0)) ASC
它在做什么:它根据称为位置的空间点字段按升序检索行我想要达到的目标:我还想为每一行设置这个sql检索距离
iyr7buue1#
为什么不选择值?
SELECT s.*, ST_Distance(location,Point(0,0)) as distance FROM stores s ORDER BY distance ASC;
1条答案
按热度按时间iyr7buue1#
为什么不选择值?