Sqlite guru needed

I have 2 identical tables and want to copy some rows from table-2 into table-1.
I’m using ‘insert into table-1 from select * from table-2 with where condition’
and get error of unique constrain of ID, which is always 0 in table-2 and is set to auto increment in table-1
( it should insert 26 rows)
how can I solve this problem ? or is there another way to do it ?
do I really have to copy column by column and row by row to solve this problem ?

Instead of using “select * …” I would name each field explicitly and omit the auto-incrementing id field. As it is not used in table-2, you obviously have no further references to it. So you can allow table one to generate a new id with autoincrement, upon inserting.

INSERT INTO first_table_name [(column1, column2, ... columnN)] SELECT column1, column2, ...columnN FROM second_table_name [WHERE condition];

question… the data that you want to copy to table 1… does it need to be in sync with table 2?

if so, this design might help:

table 1 - act as master table that stores all data.
table 2 - acts as reference table that stores the foreign key of table 1

to display data, you would join table 1 and table 2 on table 1 primary key.
to adjust table 2 data… you would insert, update, delete the foreign key of table 1.

thanks Oliver, specifying all columns works