I would like to merge two tables into one view.

Currently the first table contains 4 columns

```
ID | CatID | ImmID | Cost

```

The second one also 4 columns

```
ID | CatID | ImmID | Price

```

I would like to merge them so that the merged table will have 5 columns

```
ID | CatId | ImmId | Cost | Price

```

In case a catID is present in both table, I would like to have only one record
and if a catID is prensent in one of the two tables, I would like to put a 0 in Cost or Price column

So 3 cases.

This is my current query 

```
SELECT first.CatID, first.ImmID, first.Cost, 0
FROM costs first
UNION
SELECT second.CatID, second.ImmID, 0, second.Price
FROM prices second

```

but it doesn't work because for one single catID, two records are returned

```
12| 15| 80| 1500 | 0 
12| 15| 80|    0 | 700

```

Instead of one which will look like

```
12| 15| 80| 1500| 700  

```