I am new in mysql.
I have two completely identical mysql tables (they have similar id).
Table_1
+----+------------+------+
| id | group_name | cell |
+----+------------+------+
| 1 | YE-04 | 12 |
| 2 | AG-11 | -200 |
| 3 | VG-17 | 11 |
+----+------------+------+
Table_2
+----+------------+------+
| id | group_name | cell |
+----+------------+------+
| 1 | YE-04 | NULL |
| 2 | AG-10 | 13 |
| 3 | VG-17 | 11 |
+----+------------+------+
And I would like to.
First, compare the columns (parameters) to the fact of their inconsistencies between themselves.
Second, group them by ID.
Third, output to the third (new) table in this form (display only those parameters that do not correspond to each other):
+----+------------+----------------|----------------+
| id | col_name | table_1_param | table_2_param |
+----+------------+----------------+----------------+
| 1 | cell | 12 | NULL |
| 2 | group_name | AG-11 | AG-10 |
| 2 | cell | -200 | 13 |
+----+------------+----------------+----------------+
I tried to group them using the JOIN and UNION commands, but it did not work for me.