how to check longitude latitude database sql server <p>i have longitude and latitude in geofence table how to check longitude and latitude in database level. if car longitude latitude are in Zone, update geofance column zones = 'car in zone area'</p> <pre><code>CREATE TRIGGER Tr_CheckGeoFance ON CheckGeoFance AFTER INSERT AS BEGIN Update tblgeofencing Set CarZone ='Car In Zone Area' END GO ShapesString ={"shapes":[{"type":"rectangle","color":"#1E90FF","bounds":{"northEast":{"lat":"32.379961464357315","lon":"70.99365234375"},"southWest":{"lat":"31.840232667909362","lon":"70.2685546875"}}}]} </code></pre> <p><a href="https://i.stack.imgur.com/wHj9e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wHj9e.png" alt="enter image description here"></a></p> <p><a href="https://i.stack.imgur.com/1LYTA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1LYTA.png" alt="enter image description here"></a></p>