I work on Firebird 2.5
and I have two tables, all their columns are similar except one has a primary key with auto increment and a not null foreign key field (A) for master table
I know I can use sql like this to insert all values from the two tables
insert into table1 select * from table2 where somthing = 'foo'
You can specify both the source and target fields explicitly (and you should; don't use
select * unless you have a specific reason to):
insert into table1 ( col1, col2, col3, col4 ) select col1, col2, col3, 'foo' from table2 where something = 'foo'