ally, however, some systems, including
MariaDB's, permit polygons to have several 'ExteriorRings'. In the case of
there being multiple, non-overlapping exterior rings ST_NumInteriorRings()
will return 1.

ST_NumInteriorRings() and NumInteriorRings() are synonyms.

Examples
--------

SET @poly = 'Polygon((0 0,0 3,3 3,3 0,0 0),(1 1,1 2,2 2,2 1,1 1))';

SELECT NumInteriorRings(GeomFromText(@poly));
+---------------------------------------+
| NumInteriorRings(GeomFromText(@poly)) |
+---------------------------------------+
|                                     1 |
+---------------------------------------+

Non-overlapping 'polygon':

SELECT ST_NumInteriorRings(ST_PolyFromText('POLYGON((0 0,10 0,10 10,0 10,0 0),
 (-1 -1,-5 -1,-5 -5,-1 -5,-1 -1))')) AS NumInteriorRings;
+------------------+
| NumInteriorRings |
+------------------+
|                1 |
+------------------+

URL: https://mariadb.com/kb/en/st_numinteriorrings/https://mariadb.com/kb/en/st_numinteriorrings/