Home > Software engineering >  The SQL query problem
The SQL query problem

Time:11-09

Two table
A1:
ID decid decnm
1, 0001 switch
2, 0002 red lines
3, 0003 green line
4 0004 panel

A2:
ID decid pricejg
1 0001 6.0
2 0002 0.32
3 0003 0.24


Results for the following
1 0001 switch 6.0
2 0002 red line 0.32
3 0003 green line 0.24
4 0004 panel is empty

CodePudding user response:

https://www.w3school.com.cn/sql/sql_union.asp

CodePudding user response:

The select a1. Id, a1. Decid, a1. Decnm a2. Pricejg from a1 left join a2 on a1. Id=a2. Id;

CodePudding user response:

Left the join
  • Related