Skip to content Skip to sidebar Skip to footer

Sqlite3 Insert Into Dynamic Table

I am using sqlite3 (maybe sqlite4 in the future) and I need something like dynamic tables. I have many tables with the same format: values_2012_12_27, values_2012_12_28, ... (numbe

Solution 1:

Using SQL parameters is not possible for identifiers such as table or column names.

If you don't want to keep so many prepared statements around, just prepare them on the fly whenever you need one.


If your database were properly normalized, you would have a single big values table with an extra date column. This organization is usually to be preferred, unless you have measured both and found that the better performance (if it actually exists) outweighs the overhead of managing multiple tables.

Post a Comment for "Sqlite3 Insert Into Dynamic Table"