sql - Insert different rows between Table A and Table B into Table B -
i have 2 identical tables. table has e.g. 100 rows, table b has 60 rows. want insert "missing" rows table table b. find different rows use:
select * tablea language = 4 union select * tableb language = 4
how use code correctly "insert into" statement? idea:
insert tableb (select * tablea language = 4 union select * tableb language = 4)
best regards
union may option cause duplications. prefer minus operation.
insert tableb ( select * tablea language=4 minus select * tableb language=4)
Comments
Post a Comment