Consider a table A
and table B
like :
Table A:
debit credit row
-----------------------
10 0 1
0 10 1
20 0 2
0 20 2
30 0 3
0 30 3
Table B:
debit credit row
-----------------------
10 0 1
0 10 1
20 0 2
0 20 2
30 0 3
0 30 3
Result:
debit credit row
--------------------
10 0 1
20 0 2
30 0 3
0 10 1
0 20 2
0 30 3
I'm trying to union all table A, B and show debit first, then sort it by row column.