SELECT INTO statement in sqlite

2019-01-13 20:15发布

Here I a wanna know that whether sqlite supports SELECT INTO statement.

Actually I am trying to save the data in my table1 into table2 as a backup of my database before modifying the data.

for that when I am using the SELECT INTO Statement a syntax error was generating as:

My query as:

SELECT * INTO equipments_backup FROM equipments;

"Last Error Message:near "INTO":syntax error".

标签: sqlite3
2条回答
Juvenile、少年°
2楼-- · 2019-01-13 20:57

sqlite does not support SELECT INTO.

You can probably use this form instead:

INSERT INTO equipments_backup SELECT * FROM equipments;

查看更多
一纸荒年 Trace。
3楼-- · 2019-01-13 21:01

Instead of

SELECT * INTO equipments_backup FROM equipments

try

CREATE TABLE equipments_backup AS SELECT * FROM equipments
查看更多
登录 后发表回答