How to get the compasison difference Column values between two tables in mysql
status_tb
+----+----------+-------------+----------+
| id | status | description | state_id |
+----+----------+-------------+----------+
| 1 | new | north | 1 |
| 2 | assign | south | 2 |
| 3 |Postponed | east | 2 |
| 4 | Fixed | west | 3 |
| 8 | Verified | north-east | 1 |
| 9 | Closed | south-west | 2 |
| 35 | Test | South-test | 4 |
+----+----------+-------------+----------+
status_backup_tb
+----------+----+----------+-------------+----------+
|backup_id | id | status | description | state_id |
+----------+----+----------+-------------+----------+
| 1 | 1 |new | north | 1 |
| 2 | 2 |assign | south | 2 |
| 3 | 3 |Postponed | east | 2 |
| 4 | 4 | Fixed | west | 3 |
| 5 | 8 | Verified | north-east | 1 |
| 6 | 9 | Closed | south-west | 2 |
| 7 | 35| Rejected | Testing | 4 |
+----------+----+----------+-------------+----------+
Wanted result: Column_changed only, old_value and new_value
|new_id | id |Column_changed| Old_value |New_value |
+-------+----+--------------+-------------+----------+
|1 | 35 | status | Test | Rejected |
|2 | 35 |description | South-test | Testing |
+-------+----+--------------+-------------+----------+
If state_id
and status
was the one who changed, I wanted to get id, status and state_id
column and their old_values and new_values instead.
Already try using that but didnt work
SELECT MIN(TableName) as TableName, ID, COL1, COL2, COL3 ...
FROM
(
SELECT 'Table A' as TableName, A.ID, A.COL1, A.COL2, A.COL3, ...
FROM A
UNION ALL
SELECT 'Table B' as TableName, B.ID, B.COL1, B.COl2, B.COL3, ...
FROM B
) tmp
GROUP BY ID, COL1, COL2, COL3 ...
HAVING COUNT(*) = 1
ORDER BY ID
mysql database
add a comment |
status_tb
+----+----------+-------------+----------+
| id | status | description | state_id |
+----+----------+-------------+----------+
| 1 | new | north | 1 |
| 2 | assign | south | 2 |
| 3 |Postponed | east | 2 |
| 4 | Fixed | west | 3 |
| 8 | Verified | north-east | 1 |
| 9 | Closed | south-west | 2 |
| 35 | Test | South-test | 4 |
+----+----------+-------------+----------+
status_backup_tb
+----------+----+----------+-------------+----------+
|backup_id | id | status | description | state_id |
+----------+----+----------+-------------+----------+
| 1 | 1 |new | north | 1 |
| 2 | 2 |assign | south | 2 |
| 3 | 3 |Postponed | east | 2 |
| 4 | 4 | Fixed | west | 3 |
| 5 | 8 | Verified | north-east | 1 |
| 6 | 9 | Closed | south-west | 2 |
| 7 | 35| Rejected | Testing | 4 |
+----------+----+----------+-------------+----------+
Wanted result: Column_changed only, old_value and new_value
|new_id | id |Column_changed| Old_value |New_value |
+-------+----+--------------+-------------+----------+
|1 | 35 | status | Test | Rejected |
|2 | 35 |description | South-test | Testing |
+-------+----+--------------+-------------+----------+
If state_id
and status
was the one who changed, I wanted to get id, status and state_id
column and their old_values and new_values instead.
Already try using that but didnt work
SELECT MIN(TableName) as TableName, ID, COL1, COL2, COL3 ...
FROM
(
SELECT 'Table A' as TableName, A.ID, A.COL1, A.COL2, A.COL3, ...
FROM A
UNION ALL
SELECT 'Table B' as TableName, B.ID, B.COL1, B.COl2, B.COL3, ...
FROM B
) tmp
GROUP BY ID, COL1, COL2, COL3 ...
HAVING COUNT(*) = 1
ORDER BY ID
mysql database
changes instate_id
column (if any) also needs to be reported ?
– Madhur Bhaiya
Nov 20 '18 at 19:29
IF there a change instate_id
column, it also has to be reported, yes
– Emanula Sohn
Nov 20 '18 at 19:31
add a comment |
status_tb
+----+----------+-------------+----------+
| id | status | description | state_id |
+----+----------+-------------+----------+
| 1 | new | north | 1 |
| 2 | assign | south | 2 |
| 3 |Postponed | east | 2 |
| 4 | Fixed | west | 3 |
| 8 | Verified | north-east | 1 |
| 9 | Closed | south-west | 2 |
| 35 | Test | South-test | 4 |
+----+----------+-------------+----------+
status_backup_tb
+----------+----+----------+-------------+----------+
|backup_id | id | status | description | state_id |
+----------+----+----------+-------------+----------+
| 1 | 1 |new | north | 1 |
| 2 | 2 |assign | south | 2 |
| 3 | 3 |Postponed | east | 2 |
| 4 | 4 | Fixed | west | 3 |
| 5 | 8 | Verified | north-east | 1 |
| 6 | 9 | Closed | south-west | 2 |
| 7 | 35| Rejected | Testing | 4 |
+----------+----+----------+-------------+----------+
Wanted result: Column_changed only, old_value and new_value
|new_id | id |Column_changed| Old_value |New_value |
+-------+----+--------------+-------------+----------+
|1 | 35 | status | Test | Rejected |
|2 | 35 |description | South-test | Testing |
+-------+----+--------------+-------------+----------+
If state_id
and status
was the one who changed, I wanted to get id, status and state_id
column and their old_values and new_values instead.
Already try using that but didnt work
SELECT MIN(TableName) as TableName, ID, COL1, COL2, COL3 ...
FROM
(
SELECT 'Table A' as TableName, A.ID, A.COL1, A.COL2, A.COL3, ...
FROM A
UNION ALL
SELECT 'Table B' as TableName, B.ID, B.COL1, B.COl2, B.COL3, ...
FROM B
) tmp
GROUP BY ID, COL1, COL2, COL3 ...
HAVING COUNT(*) = 1
ORDER BY ID
mysql database
status_tb
+----+----------+-------------+----------+
| id | status | description | state_id |
+----+----------+-------------+----------+
| 1 | new | north | 1 |
| 2 | assign | south | 2 |
| 3 |Postponed | east | 2 |
| 4 | Fixed | west | 3 |
| 8 | Verified | north-east | 1 |
| 9 | Closed | south-west | 2 |
| 35 | Test | South-test | 4 |
+----+----------+-------------+----------+
status_backup_tb
+----------+----+----------+-------------+----------+
|backup_id | id | status | description | state_id |
+----------+----+----------+-------------+----------+
| 1 | 1 |new | north | 1 |
| 2 | 2 |assign | south | 2 |
| 3 | 3 |Postponed | east | 2 |
| 4 | 4 | Fixed | west | 3 |
| 5 | 8 | Verified | north-east | 1 |
| 6 | 9 | Closed | south-west | 2 |
| 7 | 35| Rejected | Testing | 4 |
+----------+----+----------+-------------+----------+
Wanted result: Column_changed only, old_value and new_value
|new_id | id |Column_changed| Old_value |New_value |
+-------+----+--------------+-------------+----------+
|1 | 35 | status | Test | Rejected |
|2 | 35 |description | South-test | Testing |
+-------+----+--------------+-------------+----------+
If state_id
and status
was the one who changed, I wanted to get id, status and state_id
column and their old_values and new_values instead.
Already try using that but didnt work
SELECT MIN(TableName) as TableName, ID, COL1, COL2, COL3 ...
FROM
(
SELECT 'Table A' as TableName, A.ID, A.COL1, A.COL2, A.COL3, ...
FROM A
UNION ALL
SELECT 'Table B' as TableName, B.ID, B.COL1, B.COl2, B.COL3, ...
FROM B
) tmp
GROUP BY ID, COL1, COL2, COL3 ...
HAVING COUNT(*) = 1
ORDER BY ID
mysql database
mysql database
edited Nov 20 '18 at 19:26
Madhur Bhaiya
19.5k62236
19.5k62236
asked Nov 20 '18 at 19:19
Emanula Sohn
255
255
changes instate_id
column (if any) also needs to be reported ?
– Madhur Bhaiya
Nov 20 '18 at 19:29
IF there a change instate_id
column, it also has to be reported, yes
– Emanula Sohn
Nov 20 '18 at 19:31
add a comment |
changes instate_id
column (if any) also needs to be reported ?
– Madhur Bhaiya
Nov 20 '18 at 19:29
IF there a change instate_id
column, it also has to be reported, yes
– Emanula Sohn
Nov 20 '18 at 19:31
changes in
state_id
column (if any) also needs to be reported ?– Madhur Bhaiya
Nov 20 '18 at 19:29
changes in
state_id
column (if any) also needs to be reported ?– Madhur Bhaiya
Nov 20 '18 at 19:29
IF there a change in
state_id
column, it also has to be reported, yes– Emanula Sohn
Nov 20 '18 at 19:31
IF there a change in
state_id
column, it also has to be reported, yes– Emanula Sohn
Nov 20 '18 at 19:31
add a comment |
2 Answers
2
active
oldest
votes
One way would be to get all changes for respective fields in individual Select
queries. Eventually Union
the results of these multiple queries.
We JOIN
between the two tables using id
and the condition that the corresponding column values are not matching.
(SELECT
s.id,
'status' AS Column_changed,
s.status AS Old_value,
b.status AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.status <> s.status)
UNION ALL
(SELECT
s.id,
'description' AS Column_changed,
s.description AS Old_value,
b.description AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.description <> s.description)
UNION ALL
(SELECT
s.id,
'state_id' AS Column_changed,
s.state_id AS Old_value,
b.state_id AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.state_id <> s.state_id)
ORDER BY id
but what if I have 10 columns, that far too long of a sql...
– Emanula Sohn
Nov 20 '18 at 19:45
@EmanulaSohn based on your required output, I fear that this might be the only way to do it in SQL. You may rather consider handling such data display related requirements in application code (eg: PHP, C++, Java etc)
– Madhur Bhaiya
Nov 20 '18 at 19:46
knows how to do it in c# with the mysql, that where im gonna need it... to display the different data in a new audit_status table
– Emanula Sohn
Nov 20 '18 at 19:50
add a comment |
Try below :
((select a.id, 'status' as Column_changed, a.status, b.status
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status <> b.status)
UNION
(select a.id, 'description' as Column_changed, a.description, b.description
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status <> b.status))
UNION
((select a.id, 'status' as Column_changed, a.status, b.status
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status_id <> b.status_id)
UNION
(select a.id, 'description' as Column_changed, a.description, b.description
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status_id <> b.status_id))
why are u repeating status and description twice?
– Emanula Sohn
Nov 20 '18 at 19:44
one row for description and one row for status asColumn_change
.
– FatemehNB
Nov 20 '18 at 19:47
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53400058%2fhow-to-get-the-compasison-difference-column-values-between-two-tables-in-mysql%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
One way would be to get all changes for respective fields in individual Select
queries. Eventually Union
the results of these multiple queries.
We JOIN
between the two tables using id
and the condition that the corresponding column values are not matching.
(SELECT
s.id,
'status' AS Column_changed,
s.status AS Old_value,
b.status AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.status <> s.status)
UNION ALL
(SELECT
s.id,
'description' AS Column_changed,
s.description AS Old_value,
b.description AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.description <> s.description)
UNION ALL
(SELECT
s.id,
'state_id' AS Column_changed,
s.state_id AS Old_value,
b.state_id AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.state_id <> s.state_id)
ORDER BY id
but what if I have 10 columns, that far too long of a sql...
– Emanula Sohn
Nov 20 '18 at 19:45
@EmanulaSohn based on your required output, I fear that this might be the only way to do it in SQL. You may rather consider handling such data display related requirements in application code (eg: PHP, C++, Java etc)
– Madhur Bhaiya
Nov 20 '18 at 19:46
knows how to do it in c# with the mysql, that where im gonna need it... to display the different data in a new audit_status table
– Emanula Sohn
Nov 20 '18 at 19:50
add a comment |
One way would be to get all changes for respective fields in individual Select
queries. Eventually Union
the results of these multiple queries.
We JOIN
between the two tables using id
and the condition that the corresponding column values are not matching.
(SELECT
s.id,
'status' AS Column_changed,
s.status AS Old_value,
b.status AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.status <> s.status)
UNION ALL
(SELECT
s.id,
'description' AS Column_changed,
s.description AS Old_value,
b.description AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.description <> s.description)
UNION ALL
(SELECT
s.id,
'state_id' AS Column_changed,
s.state_id AS Old_value,
b.state_id AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.state_id <> s.state_id)
ORDER BY id
but what if I have 10 columns, that far too long of a sql...
– Emanula Sohn
Nov 20 '18 at 19:45
@EmanulaSohn based on your required output, I fear that this might be the only way to do it in SQL. You may rather consider handling such data display related requirements in application code (eg: PHP, C++, Java etc)
– Madhur Bhaiya
Nov 20 '18 at 19:46
knows how to do it in c# with the mysql, that where im gonna need it... to display the different data in a new audit_status table
– Emanula Sohn
Nov 20 '18 at 19:50
add a comment |
One way would be to get all changes for respective fields in individual Select
queries. Eventually Union
the results of these multiple queries.
We JOIN
between the two tables using id
and the condition that the corresponding column values are not matching.
(SELECT
s.id,
'status' AS Column_changed,
s.status AS Old_value,
b.status AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.status <> s.status)
UNION ALL
(SELECT
s.id,
'description' AS Column_changed,
s.description AS Old_value,
b.description AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.description <> s.description)
UNION ALL
(SELECT
s.id,
'state_id' AS Column_changed,
s.state_id AS Old_value,
b.state_id AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.state_id <> s.state_id)
ORDER BY id
One way would be to get all changes for respective fields in individual Select
queries. Eventually Union
the results of these multiple queries.
We JOIN
between the two tables using id
and the condition that the corresponding column values are not matching.
(SELECT
s.id,
'status' AS Column_changed,
s.status AS Old_value,
b.status AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.status <> s.status)
UNION ALL
(SELECT
s.id,
'description' AS Column_changed,
s.description AS Old_value,
b.description AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.description <> s.description)
UNION ALL
(SELECT
s.id,
'state_id' AS Column_changed,
s.state_id AS Old_value,
b.state_id AS New_value
FROM status_tb AS s
JOIN status_backup_tb AS b
ON b.id = s.id AND
b.state_id <> s.state_id)
ORDER BY id
answered Nov 20 '18 at 19:35
Madhur Bhaiya
19.5k62236
19.5k62236
but what if I have 10 columns, that far too long of a sql...
– Emanula Sohn
Nov 20 '18 at 19:45
@EmanulaSohn based on your required output, I fear that this might be the only way to do it in SQL. You may rather consider handling such data display related requirements in application code (eg: PHP, C++, Java etc)
– Madhur Bhaiya
Nov 20 '18 at 19:46
knows how to do it in c# with the mysql, that where im gonna need it... to display the different data in a new audit_status table
– Emanula Sohn
Nov 20 '18 at 19:50
add a comment |
but what if I have 10 columns, that far too long of a sql...
– Emanula Sohn
Nov 20 '18 at 19:45
@EmanulaSohn based on your required output, I fear that this might be the only way to do it in SQL. You may rather consider handling such data display related requirements in application code (eg: PHP, C++, Java etc)
– Madhur Bhaiya
Nov 20 '18 at 19:46
knows how to do it in c# with the mysql, that where im gonna need it... to display the different data in a new audit_status table
– Emanula Sohn
Nov 20 '18 at 19:50
but what if I have 10 columns, that far too long of a sql...
– Emanula Sohn
Nov 20 '18 at 19:45
but what if I have 10 columns, that far too long of a sql...
– Emanula Sohn
Nov 20 '18 at 19:45
@EmanulaSohn based on your required output, I fear that this might be the only way to do it in SQL. You may rather consider handling such data display related requirements in application code (eg: PHP, C++, Java etc)
– Madhur Bhaiya
Nov 20 '18 at 19:46
@EmanulaSohn based on your required output, I fear that this might be the only way to do it in SQL. You may rather consider handling such data display related requirements in application code (eg: PHP, C++, Java etc)
– Madhur Bhaiya
Nov 20 '18 at 19:46
knows how to do it in c# with the mysql, that where im gonna need it... to display the different data in a new audit_status table
– Emanula Sohn
Nov 20 '18 at 19:50
knows how to do it in c# with the mysql, that where im gonna need it... to display the different data in a new audit_status table
– Emanula Sohn
Nov 20 '18 at 19:50
add a comment |
Try below :
((select a.id, 'status' as Column_changed, a.status, b.status
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status <> b.status)
UNION
(select a.id, 'description' as Column_changed, a.description, b.description
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status <> b.status))
UNION
((select a.id, 'status' as Column_changed, a.status, b.status
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status_id <> b.status_id)
UNION
(select a.id, 'description' as Column_changed, a.description, b.description
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status_id <> b.status_id))
why are u repeating status and description twice?
– Emanula Sohn
Nov 20 '18 at 19:44
one row for description and one row for status asColumn_change
.
– FatemehNB
Nov 20 '18 at 19:47
add a comment |
Try below :
((select a.id, 'status' as Column_changed, a.status, b.status
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status <> b.status)
UNION
(select a.id, 'description' as Column_changed, a.description, b.description
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status <> b.status))
UNION
((select a.id, 'status' as Column_changed, a.status, b.status
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status_id <> b.status_id)
UNION
(select a.id, 'description' as Column_changed, a.description, b.description
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status_id <> b.status_id))
why are u repeating status and description twice?
– Emanula Sohn
Nov 20 '18 at 19:44
one row for description and one row for status asColumn_change
.
– FatemehNB
Nov 20 '18 at 19:47
add a comment |
Try below :
((select a.id, 'status' as Column_changed, a.status, b.status
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status <> b.status)
UNION
(select a.id, 'description' as Column_changed, a.description, b.description
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status <> b.status))
UNION
((select a.id, 'status' as Column_changed, a.status, b.status
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status_id <> b.status_id)
UNION
(select a.id, 'description' as Column_changed, a.description, b.description
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status_id <> b.status_id))
Try below :
((select a.id, 'status' as Column_changed, a.status, b.status
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status <> b.status)
UNION
(select a.id, 'description' as Column_changed, a.description, b.description
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status <> b.status))
UNION
((select a.id, 'status' as Column_changed, a.status, b.status
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status_id <> b.status_id)
UNION
(select a.id, 'description' as Column_changed, a.description, b.description
From status_tb as a inner join status_backup_tb as b on a.id = b.id
Where a.status_id <> b.status_id))
answered Nov 20 '18 at 19:37
FatemehNB
25126
25126
why are u repeating status and description twice?
– Emanula Sohn
Nov 20 '18 at 19:44
one row for description and one row for status asColumn_change
.
– FatemehNB
Nov 20 '18 at 19:47
add a comment |
why are u repeating status and description twice?
– Emanula Sohn
Nov 20 '18 at 19:44
one row for description and one row for status asColumn_change
.
– FatemehNB
Nov 20 '18 at 19:47
why are u repeating status and description twice?
– Emanula Sohn
Nov 20 '18 at 19:44
why are u repeating status and description twice?
– Emanula Sohn
Nov 20 '18 at 19:44
one row for description and one row for status as
Column_change
.– FatemehNB
Nov 20 '18 at 19:47
one row for description and one row for status as
Column_change
.– FatemehNB
Nov 20 '18 at 19:47
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53400058%2fhow-to-get-the-compasison-difference-column-values-between-two-tables-in-mysql%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
changes in
state_id
column (if any) also needs to be reported ?– Madhur Bhaiya
Nov 20 '18 at 19:29
IF there a change in
state_id
column, it also has to be reported, yes– Emanula Sohn
Nov 20 '18 at 19:31