RaigorJiang commented on issue #30849:
URL: 
https://github.com/apache/shardingsphere/issues/30849#issuecomment-2049944298

   <img width="562" alt="image" 
src="https://github.com/apache/shardingsphere/assets/5668787/1619dc5d-08f8-4766-92ec-845a9e22f82d";>
   
   ---
   
   Hi, @dobet , I found some problems:
   1. You created the sharding rule `d_sbtest`, but the table you created is 
`t_order`, they are not related.
   2. In the sharding rules, `DATANODES` is incomplete, it may be 
`"sbtest_${0..1}.d_sbtest"` .
   
   ### Example
   ```sql
   mysql> CREATE SHARDING TABLE RULE d_sbtest ( 
DATANODES("sbtest_${0..1}.d_sbtest"), 
DATABASE_STRATEGY(TYPE="standard",SHARDING_COLUMN=user_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="sbtest_${user_id
 % 2}")))));
   Query OK, 0 rows affected (0.14 sec)
   
   mysql> show sharding table nodes;
   +----------+--------------------------------------+
   | name     | nodes                                |
   +----------+--------------------------------------+
   | d_sbtest | sbtest_0.d_sbtest, sbtest_1.d_sbtest |
   +----------+--------------------------------------+
   1 row in set (0.01 sec)
   ```
   
   
   Please refer to 
https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule/#1standard-sharding-table-rule
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to