jeudi 24 septembre 2015

Query to retain tuples which were not subtracted

I have two tables as follows

table1

name number
a    100
b    150
c    200

table 2

name number
a    10
b    20

How can I write a query to subtract both tables and retain values such as c

Output should be:

name number
a     90
b     130
c     200

I know how to get a and b just couldn't figure out how to keep c as well.

Aucun commentaire:

Enregistrer un commentaire