How to get the compasison difference Column values between two tables in mysql












1















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









share|improve this question

























  • 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
















1















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









share|improve this question

























  • 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














1












1








1








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









share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 '18 at 19:26









Madhur Bhaiya

19.6k62236




19.6k62236










asked Nov 20 '18 at 19:19









Emanula SohnEmanula Sohn

275




275













  • 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



















  • 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

















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












2 Answers
2






active

oldest

votes


















1














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





share|improve this answer
























  • 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



















0














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))





share|improve this answer
























  • 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











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
});


}
});














draft saved

draft discarded


















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









1














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





share|improve this answer
























  • 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
















1














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





share|improve this answer
























  • 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














1












1








1







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





share|improve this answer













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






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 20 '18 at 19:35









Madhur BhaiyaMadhur Bhaiya

19.6k62236




19.6k62236













  • 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













  • @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













0














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))





share|improve this answer
























  • 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
















0














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))





share|improve this answer
























  • 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














0












0








0







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))





share|improve this answer













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))






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 20 '18 at 19:37









FatemehNBFatemehNB

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 as Column_change.

    – FatemehNB
    Nov 20 '18 at 19:47



















  • 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

















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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







這個網誌中的熱門文章

Xamarin.form Move up view when keyboard appear

Post-Redirect-Get with Spring WebFlux and Thymeleaf

Anylogic : not able to use stopDelay()