Reputation: 192
I have two columns in a table. I am using this table in an android application. For ex., TAB1:
when I display One, the display_count of 1 should increment by 1. Like that, I have to display the names continuously through out my application. Mean while, the display_count is getting too big in long run. Is there any option in sqlite, to restrict the column data, such that, if I reach a certain value say display_count = 64 for a row, the display_count should should reset to 1 and again start from 1. To say clearly, display_count should not exceed 64.
Upvotes: 0
Views: 61
Reputation: 1761
Logically while updating, you can use (col=col+1)%65 instead of col=col+1. The thing is count will again start from 0 instead of 1
Upvotes: 1