MySQL Forums
Forum List  »  Partitioning

ALTER TABLE t_test ADD PARTITION BY LIST(field)?
Posted by: Carlo Rossetti
Date: September 18, 2011 03:27AM

DROP TABLE IF EXISTS `t_test`;

CREATE TABLE `t_test` (
`marca_id` INT(11) UNSIGNED NOT NULL DEFAULT '0'
) ENGINE=MYISAM DEFAULT CHARSET=utf8;

INSERT INTO t_test (marca_id)
VALUES (1),(1),(2),(2),(2),(3),(3),(4),(4),(4),(4),(5),(5),(5),(5),(6),(6),(6),(7),(8),(9),(10),(11),(12),(12),(12),(12),(12),(12),(12),(12),(12);

-- ALTER TABLE t_test PARTITION BY KEY(id);
ALTER TABLE t_test ADD PARTITION BY LIST(marca_id)
(
PARTITION m001 VALUES (1,2,3),
PARTITION m002 VALUES (4),
PARTITION m003 VALUES (5,6),
PARTITION m004 VALUES (7,8,9),
PARTITION m005 VALUES (10,11,12)
);

Does exist a sql syntax to add later one or more partition by list to a table?

Options: ReplyQuote


Subject
Views
Written By
Posted
ALTER TABLE t_test ADD PARTITION BY LIST(field)?
5886
September 18, 2011 03:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.