Home > database >  Drop ~ turn card, Oracle merge two tables in the same field, all the rest of the show, SQL
Drop ~ turn card, Oracle merge two tables in the same field, all the rest of the show, SQL

Time:09-18

The existing
[1]
[2]
Will [1] and [2] merger (table 3) as shown in figure

, every brother please teach

CodePudding user response:

Table 3?

CodePudding user response:

reference 1st floor selling fruit net reply:
table 3?
the third picture is table 3

CodePudding user response:

Full join

CodePudding user response:

The
reference 3 floor nayi_224 response:
full join
full join me, there will be two columns of A

CodePudding user response:

Bibn
reference 4 floor response:
Quote: refer to the third floor nayi_224 response:
full join
full join me, there will be two columns of A

nvl

CodePudding user response:

Table A
1 jack
2 xm
3 xh
4 ll
5 er


Table B
1 11
3 33
4 44
6 66

Execute SQL
The select NVL (Anderson, d, b.i d) aid, a.n ame, b.a ge from A A full join B B on Anderson, d=b.i d order by aid

The results
1 jack 11
2 xm
3 xh 33
4 ll 44
5 er
6 66
Please try, there is nothing wrong with brother!

CodePudding user response:

refer to 6th floor weixin_38426425 response:
list A1 jack
2 xm
3 xh
4 ll
5 er


Table B
1 11
3 33
4 44
6 66

Execute SQL
The select NVL (Anderson, d, b.i d) aid, a.n ame, b.a ge from A A full join B B on Anderson, d=b.i d order by aid

The results
1 jack 11
2 xm
3 xh 33
4 ll 44
5 er
6 66
Please try, there is nothing wrong with brother!
thanks, can you try