I have a MySQL 8 table with a column called "coordinates" of type "polygon".
I am trying to insert a set of coordinates into it, like so:
INSERT INTO contract (coordinates)
VALUES (POLYGON(
(34.786166422784426, 32.162676265661624),
(34.720248454034426, 32.01024096292725),
(34.816378825128176, 31.973162105505374),
(34.86993717473755, 32.1338371543335),
(34.786166422784426, 32.162676265661624))
)
which is giving me a "column count doesn't match value count at row 1" error.
Why is this? How do I properly format this query? And how can I explicitly pass an ESRI with it?
This, by the way, works fine:
INSERT INTO contract (coordinates, smart_contract_version_id)
VALUES (ST_GeomFromText('POLYGON(( 34.786166422784426 32.162676265661624 , 34.720248454034426 32.01024096292725 , 34.816378825128176 31.973162105505374 , 34.86993717473755 32.1338371543335 , 34.786166422784426 32.162676265661624 ))', 4326), 1)