Remove partition from table

Asked

Viewed 373 times

0

Using the mysql documentation, I created the partition based on a year field.

ALTER TABLE minhatabela
PARTITION BY HASH (ano_referencia)
PARTITIONS 10

To make a possible rollback, how I would drop that partition?

In the documentation it says that is to do so:

ALTER TABLE t1 DROP PARTITION p0, p1;

However, I do not have the partition name. Using Heidisql and viewing, the table information becomes available like this:

inserir a descrição da imagem aqui

1 answer

1


ALTER TABLE t1 REMOVE PARTITIONING;

REMOVE PARTITIONING

REMOVE PARTITIONING Enables you to remove a table’s partitioning without otherwise affecting the table or its data.

In free translation:

REMOVE PARTITIONING enables you to remove partitioning from the table without affecting the rest of the table or its data.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.