I am trying to join two Table One table A with serial number and a key columns other table B with key column and other columns to join. When i apply my join ,serial number in table A is not matching after joining with Table B . in simple i need to get a table after joining same as the order of Table A.
Any one Pl suggest some idea. Table A
S.no ID
1 XXXX1
2 XXXX2
3 XXXX3
4 XXXX4
5 XXXX5
Table B
ID Value
XXXX2 5
XXXX1 6
XXXX3 9
XXXX5 4
XXXX4 3
Expected
S.no ID Value
1 XXXX1 6
2 XXXX2 5
3 XXXX3 9
4 XXXX4 3
5 XXXX5 4
Achieved now
S.no ID Value
2 XXXX4 3
1 XXXX3 9
5 XXXX1 6
3 XXXX5 4
4 XXXX2 5
https://stackoverflow.com/questions/66057211/serial-number-changes-after-joining-two-tables-in-sql-how-can-we-arrest February 05, 2021 at 11:35AM
没有评论:
发表评论