id
column) when creating new records. Instead, you can rely on the AUTO INCREMENT feature provided by the database.
For reference tables, this can be challenging because the id
values must remain synchronized across all shards. Fortunately, SPQR supports this functionality through a feature called sequences.
Here’s an example of how you can automatically generate id
values. To create a reference table with country codes and region names, follow these steps: