I use SQLite. How can I use something like this:
INSERT INTO (
SELECT `table_name`
FROM `tables`
WHERE `id`=1)(`data_column_name`)
VALUES ('some data')
Thanks for help
According to the documentation you cannot. The INSERT
statement takes a table name - with an optional schema name - not an expression.
You would have to evaluate the SELECT
and then build the INSERT
statement.