select *,16 as tableNumber from merger_16 where gridID in (55162406,55162407,55162408,55180406,55180407,55180408,55198406,55198407,55198408) order by ((lon-104.079048)*(lon-104.079048)+(lat-30.658125)*(lat-30.658125)) asc
但是因为要用的分页,,所以说要先查出 步骤2:
SQL code
select count(*) from(select *,16 as tableNumber from merger_16 where gridID in (55162406,55162407,55162408,55180406,55180407,55180408,55198406,55198407,55198408) order by ((lon-104.079048)*(lon-104.079048)+(lat-30.658125)*(lat-30.658125)) asc) t
------解决方案-------------------- select *,16 as tableNumber from merger_16 where gridID in (55162406,55162407,55162408,55180406,55180407,55180408,55198406,55198407,55198408) order by ((lon-104.079048)*(lon-104.079048)+(lat-30.658125)*(lat-30.658125)) asc