Was this helpful?
Triangle Data Type
The Triangle data type is similar to the Polygon type except that it contains only triangles.
Examples:
Without specifying SRID:
CREATE TABLE triangles (name VARCHAR(30), tri TRIANGLE);
With specifying SRID:
CREATE TABLE triangles (name VARCHAR(30), tri TRIANGLE SRID 4326);
Show a line followed by an arc:
CREATE TABLE triangles (id INT, tri TRIANGLE);
INSERT INTO triangles (id, tri) VALUES (1, GeomFromText('TRIANGLE((0 0, 5 5, 10 0, 0 0), (10 10, 10 20, 20 10, 10 10))'));
Last modified date: 11/09/2022