1

I have table with latitude & longitude columns in SQL. how can I select all records with lat-long 60 degree North or greater (Arctic Region)

4

how about:

select * from table where latitude > 60.0;
| improve this answer | |
  • its not giving correct result. – Pragnesh Patel Jun 13 '11 at 8:55
  • 1
    in what way is it not correct? – Ian Turton Jun 13 '11 at 17:01
0

One thing to consider is that if you have a large dataset then defining your data using lat / long, instead of using a real GIS geometry like PostGIS geography or geometry, prevents you from building spatial indexes on your data. You could get by with building a B+-tree index on your latitude field for the query iant provided, but the moment you need to start doing queries involving both longitude and latitude your indexes will perform sub-par (even if you have two separate indexes on both lat and lon).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.