Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save franciscopessoa/9e72587e339cc7d35497ca9a7c3d7ff1 to your computer and use it in GitHub Desktop.
Save franciscopessoa/9e72587e339cc7d35497ca9a7c3d7ff1 to your computer and use it in GitHub Desktop.
select points inside polygon mysql
select
*
from
revan_vendas.teste_localizacao
where
st_within(point(lg,
lt),
ST_GeomFromText('Polygon(
(-38.498775 -6.197860,
-38.498612 -6.197349,
-38.498143 -6.197477,
-38.498333 -6.198003,
-38.498894 -6.198675,
-38.499025 -6.198600,
-38.498775 -6.197860))'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment