ALTER SHARDING TABLE REFERENCE RULE
语法用于修改分片表关联关系
AlterShardingTableReferenceRule ::=
'ALTER' 'SHARDING' 'TABLE' 'REFERENCE' 'RULE' referenceRelationshipDefinition (',' referenceRelationshipDefinition)*
referenceRelationshipDefinition ::=
ruleName '(' tableName (',' tableName)* ')'
tableName ::=
identifier
ds_${0..1}.t_order_${0..1}
与 ds_${0..1}.t_order_item_${0..1}
;t_order_${order_id % 2}
与 t_order_item_${order_item_id % 2}
;ALTER SHARDING TABLE REFERENCE RULE ref_0 (t_order,t_order_item);
ALTER SHARDING TABLE REFERENCE RULE ref_0 (t_order,t_order_item), ref_1 (t_product,t_product_item);
ALTER
、SHARDING
、TABLE
、REFERENCE
、RULE