On 9 Feb 2019, at 3:49pm, Jose Isaias Cabrera <jic...@outlook.com> wrote:
> Imagine this scenario:I have this table, > > t (a PRIMARY KEY, b, c, d, e) > > that contains yesterday's data. Today, I rename that table to, > > t_20190208 (a PRIMARY KEY, b, c, d, e). That's not how you use tables. Your software shouldn't be automatically creating or dropping tables during the life of your program. Have one table for your data for all days. Add an extra column to the table for the datestamp. Then to select all data for a particular day you do SELECT * From t WHERE datestamp = "20190208" If you only ever need to keep two days worth of data, then instead of a datestamp column you can use one which contains the text 'yesterday' or 'today'. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users