diff --git a/keygen/README.md b/keygen/README.md index 49e36b1..7f2c572 100644 --- a/keygen/README.md +++ b/keygen/README.md @@ -9,13 +9,13 @@ A Distributed Primary Key generator. Keygen id contains a table index in it's bit sequence, so we can locate the sharding table whitout the sharding key. For example, use Keygen id, we could use: -``` +```sql select * from orders where id = 76362673717182593 ``` Use snowflake, you should use: -``` +```sql select * from orders where id = 76362673717182593 and user_id = 100 ``` diff --git a/keygen/README.zh-CN.md b/keygen/README.zh-CN.md index 92c4a36..4cd6e25 100644 --- a/keygen/README.zh-CN.md +++ b/keygen/README.zh-CN.md @@ -9,13 +9,13 @@ Keygen id 在其比特序列中包含了表索引,这样可以在没有分表键的情况下定位分表。 例如,使用 Keygen id,我们可以: -``` +```sql select * from orders where id = 76362673717182593 ``` 使用雪花算法,则需要: -``` +```sql select * from orders where id = 76362673717182593 and user_id = 100 ```