sqlite insert into table select * from

后端 未结 3 548
予麋鹿
予麋鹿 2020-12-02 18:38

I need to move data from one table to another in my Android app

I would like to use the following sql:

insert into MYTABLE2 select id, STATUS rispos         


        
3条回答
  •  青春惊慌失措
    2020-12-02 19:13

    explicitly specify the column name in the INSERT clause,

    INSERT INTO destinationTable (risposta, data_ins)
    SELECT STATUS risposta, DATETIME('now') data_ins 
    FROM   sourceTable
    

提交回复
热议问题