jingshanglu commented on issue #9046:
URL: https://github.com/apache/shardingsphere/issues/9046#issuecomment-764232091


   @terrymanu @tristaZero How about this? 
   `[]` : optional 
   ```
   alter SHARDING RULE (
   modify t_order ['ds_00.t_order_000${0..1}','ds_01.t_order_000${2..3}'] 
[TABLESTRATEGY order_id HASH_MOD(xxx=xxx)] [DATABASESTRATEGY order_id 
HASH_MOD(xxx=xxx)]  [KEYGENERATESTRATEGY order_id HASH_MOD(xxx=xxx)],
   add t_item 'ds_00.t_item_000${0..1}','ds_01.t_item_000${2..3}' 
[TABLESTRATEGY order_id HASH_MOD(xxx=xxx)] [DATABASESTRATEGY order_id 
HASH_MOD(xxx=xxx)]  [KEYGENERATESTRATEGY order_id HASH_MOD(xxx=xxx)],
   [binding_tables t_order,t_item]
   [default_table_strategy order_id HASH_MOD(xxx=xxx)]
   [broadcast_tables tb1, tb2]
   )
   
   create SHARDING RULE (
   modify t_order 'ds_00.t_order_000${0..1}','ds_01.t_order_000${2..3}' 
[TABLESTRATEGY order_id HASH_MOD(xxx=xxx)] [DATABASESTRATEGY order_id 
HASH_MOD(xxx=xxx)]  [KEYGENERATESTRATEGY order_id HASH_MOD(xxx=xxx)],
   add t_item 'ds_00.t_item_000${0..1}','ds_01.t_item_000${2..3}' 
[TABLESTRATEGY order_id HASH_MOD(xxx=xxx)] [DATABASESTRATEGY order_id 
HASH_MOD(xxx=xxx)]  [KEYGENERATESTRATEGY order_id HASH_MOD(xxx=xxx)],
   [binding_tables t_order,t_item]
   [default_table_strategy order_id HASH_MOD(xxx=xxx)]
   [broadcast_tables tb1, tb2]
   )
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to