title: How to search (predefined) locations (Latitude/Longitude) within a Rectangular, using Sql?
body: <p>I have the North, East, South and West values of a Rectangular location, how can I search only those locations (Latitude/Longitude) that are within the bounds of that Rectangular location?</p>
  
  <p><img src="https://i.stack.imgur.com/73J2n.gif" alt="enter image description here"></p>
  
  <p>Please note that I need to search the Locations (Latitude/Longitude) within a database. I need to find the locations in the database which are in the bounds of a given rectangular and I will draw markers for them on the map.</p>
  
  <p>I am not talking about <a href="https://developers.google.com/places/documentation/search" rel="nofollow noreferrer">Google search</a>, the APIs for search already support passing the rectangular bound to filter the search.</p>
  
  <p>The <code>googlemaps</code> APIs can do this for me like:</p>
  
  <pre><code>var request = {
      bounds: myMapObject.getBounds(), // Search only within the Bound of the Map
      query: someTextToFind
  };
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>var isWithInMapsBounds = myMapObject.getBounds().contains(myLocation);
  </code></pre>
  
  <p><strong>But I need to do it while getting the locations from database, I mean on Server side</strong>.</p>
  
  <p>Can someone guide me in the right direction, how to achieve this functionality?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I want to search within database; so I need an SQL solution.</p>