I have two tables, both have same number of columns with none of them having any primary key as below:
Table A
| Name | Ranking | Genre | Category | Rated |
|---|---|---|---|---|
| M1 | 1 | Comedy | Movie | G |
| M2 | 2 | Action | Series | PG |
Table B
| Name | Ranking | Genre | Category | Rated |
|---|---|---|---|---|
| MX1 | 44 | Thriller | Series | G |
| M2 | 2 | Action | Series | PG |
I need to fetch the uncommon records from both the tables, where Ranking and Name combined is unique for them.
I have tried using left and right join but it gives me all the records from either one table. My priority here is to fetch just the uncommon records as below:
| Name | Ranking | Genre | Category | Rated |
|---|---|---|---|---|
| M1 | 1 | Comedy | Movie | G |
| MX1 | 44 | Thriller | Series | G |
