Closed forkforlearn closed 6 years ago
Both queries are not valid SQL and should result in a sqlite3.OperationalError
.
OperationalError: (sqlite3.OperationalError) near "table": syntax error [SQL: 'insert into table select * from table b'] (Background on this error at: http://sqlalche.me/e/e3q8)
Concerning your queries: 1. there's no when
keyword, use where
. 2. don't mix insert
and select
statements.
But you should not run raw queries directly on the database before the structure is properly set up. Use the other dataset operations (e.g. table.insert
) on tables to run your queries.
Hi ,when i try to us db.query , there is no message return, for example:
db.query('update table set column1 = 123 when column2 = 222')
ordb.query('insert into table select * from table b')