Question: I am just learning function templates and the template I created below doesn't compile and I am not sure what's wrong. I am trying to make an int variable and a double variable go into the template but I keep getting an error when I call the function. The error is:

> 
> error: no matching function for call to 'LargestFunction(int&, double&)'|
> 
> 
> 

and the code is as follows:

```
 template <class Temp>
    Temp LargestFunction(Temp a, Temp b){
        if(a > b){
            return a;
        }
    else
        return b;
    }

    int main()
    {
        int NumOne = 30;
        double NumTwo = 52.252;
        cout << LargestFunction(NumOne,NumTwo);
        return 0;
    }

```

Answer: 
You probably are looking for an outer join or an outer excluding join.

OUTER JOIN

![enter image description here](https://i.stack.imgur.com/hx2oa.png)

```
SELECT *
FROM tableA a
FULL OUTER JOIN tableB b
    ON a.column = b.column

```

OUTER EXCLUDING JOIN

![enter image description here](https://i.stack.imgur.com/HnCXd.png)

```
SELECT *
FROM tableA a
FULL OUTER JOIN tableB b
    ON a.column = a.column
WHERE a.column IS NULL OR b.column IS NULL

```

![sql joins](https://i.stack.imgur.com/pUmRh.jpg)

The graphs in this answer are taken from this very useful [article](http://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins).
If you want to get values from both tables, you can use full outer join and take records which have one side as null:

```
select a.*, b.* from tableA a
full outer join tableB b on a.col = b.col
where a.col is null or b.col is null

```

Obviously this way all the values for either one table or the other will be null.