O'Reilly logo

MySQL 8 Cookbook by Karthik Appigatla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Querying the INFORMATION_SCHEMA.PARTITIONS table

Compared to all the preceding methods, INFORMATION_SCHEMA.PARTITIONS gives more information about the partitions:

mysql> SHOW CREATE TABLE INFORMATION_SCHEMA.PARTITIONS\G*************************** 1. row ***************************       Table: PARTITIONSCreate Table: CREATE TEMPORARY TABLE `PARTITIONS` (  `TABLE_CATALOG` varchar(512) NOT NULL DEFAULT '',  `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',  `TABLE_NAME` varchar(64) NOT NULL DEFAULT '',  `PARTITION_NAME` varchar(64) DEFAULT NULL,  `SUBPARTITION_NAME` varchar(64) DEFAULT NULL,  `PARTITION_ORDINAL_POSITION` bigint(21) unsigned DEFAULT NULL,  `SUBPARTITION_ORDINAL_POSITION` bigint(21) unsigned DEFAULT NULL, `PARTITION_METHOD` varchar(18) DEFAULT ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required