SELECT
name
FROM
tblshops
WHERE
st_contains((select shape from tbltowns where name='London'), location)
MySQL select points which are contained in a polygon from a different table
-
11-07-2023 - |
문제
I have two tables.
Table a contains a list of names and locations (points) Table b contains a list of names and shape (polygons)
I want to write a query to find all points from a which are contained inside a given town from b
Something along the lines of
select name from tblshops where st_contains(select shape from tbltowns where name="London", location)
but I keep getting a syntax error. What am I doing wrong? Thanks
해결책
제휴하지 않습니다 StackOverflow