I have two tables with the same schemas, table A and table B:
| Table [A] | Table [B]
| id value | id value
| 1 15 | 1 19
| 2 18 | 3 28
| 5 22 | 4 39
I would like to do:
insert into a select * from b where [b.id not exists in a]
Question: What’s the syntax for this – in particular, the portion in the brackets?
use
INSERT INTO..SELECTstatement andLEFT JOIN.