'Update the row in PostgreSQL
I'm stuck on a question please help me out. Let me explain the question Let's assume a table has a limit of 10 rows. and when we want to add the 11th row it should replace the data of the 1st row. I'm thinking the logic should be like this: if id > 10 then it will replace by ( id % 10 ) place. But don't what will be the query in PSQL. Please help me out. Thanks in advance:slightly_smiling_face:
I want a master nodejs server and 5 slave servers. and the slave servers have their own DB. The master node doesn't have any DB. That server only can take data from users and distribute it among the slave server. And Each Slave server's capacity is 10. They can store 10 data and when 50data is stored among them then the 51st data will replace 1st data.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
