mysql MULTIPOLYGON
时间: 2023-10-19 13:36:12 浏览: 114
mysql多实例
MySQL does support the MULTIPOLYGON data type, which allows you to store multiple polygons in a single field.
To create a table with a column of type MULTIPOLYGON, you can use the following syntax:
```sql
CREATE TABLE your_table_name (
id INT PRIMARY KEY,
polygons MULTIPOLYGON
);
```
To insert a MULTIPOLYGON value into the table, you need to use the Well-Known Text (WKT) format. Here's an example query:
```sql
INSERT INTO your_table_name (id, polygons)
VALUES (1, 'MULTIPOLYGON(((0 0, 0 1, 1 1, 1 0, 0 0)), ((2 2, 2 3, 3 3, 3 2, 2 2)))');
```
Please note that the actual syntax and usage may vary depending on your specific MySQL version and client. It's important to consult the official MySQL documentation for more details and examples.
阅读全文