Mike9
Mike9

Reputation: 3

Is it possible to write a code for DROP the first partition without specifying the name?

The pseudocode would be something like the following:

ALTER TABLE sql_store.sale_mast13 DROP PARTITION FIRS_VALUE(PARTITIONS)

Upvotes: 0

Views: 36

Answers (1)

Rick James
Rick James

Reputation: 142518

No. But you can get the name from information_schema.PARTITIONS. See GatherPartitionInfo() in http://mysql.rjweb.org/demo_part_maint.pl.txt . For more on partitioning, see the parent page: http://mysql.rjweb.org/doc.php/partitionmaint

Upvotes: 1

Related Questions