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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -