Hi,
I know this should be basic SQL but have been struggling on this one!
I have two identical tables T1 and T2 with two fields which are composite primary keys. If I wish to insert only records from T2 into T1 that don't already exist in T1 how can I do it?
e.g.
T1 T2
A B A B
1 2 1 2
2 3 2 3
3 4 8 9
What will be the SQL to insert only the third record (8 9) from T2 into T1?
Thanks
Gareth
I know this should be basic SQL but have been struggling on this one!
I have two identical tables T1 and T2 with two fields which are composite primary keys. If I wish to insert only records from T2 into T1 that don't already exist in T1 how can I do it?
e.g.
T1 T2
A B A B
1 2 1 2
2 3 2 3
3 4 8 9
What will be the SQL to insert only the third record (8 9) from T2 into T1?
Thanks
Gareth