CREATE SHARDING TABLE REFERENCE RULE

    • A sharding table can only be associated with one sharding table reference rule;
    • The referenced sharding tables should be sharded in the same storage units and have the same number of sharding nodes. For example ds_${0..1}.t_order_${0..1} and ds_${0..1}.t_order_item_${0..1};
    • The referenced sharding tables should use consistent sharding algorithms. For example and t_order_item_{order_item_id % 2};
    • ifNotExists clause used for avoid Duplicate sharding table reference rule error.

    1.Create a sharding table reference rule

    2.Create multiple sharding table reference rules

    3.Create a sharding table reference rule with clause