1. create table sales(
    2. order_date DATETIME not null,
    3. -- Other columns omitted
    4. )ENGINE=InnoDB PARTITION BY RANGE(YEAR(order_date))(
    5. PARTITION P_2017 VALUES LESS THAN(2017),
    6. PARTITION P_2018 VALUES LESS THAN(2018),
    7. PARTITION P_2019 VALUES LESS THAN(2019),
    8. PARTITION P_catchall VALUES LESS THAN MAXVALUE
    9. );