In the existing table a table b, two tables, have the same primary key, and column 1, and two tables using associated column 1, demand is a table there is a data query is a, is given priority to with a table, but the two tables left query table will appear a data table b data, the duplicate data, the problem for bosses to help solve the
CodePudding user response:
The original poster posted, please test table, the test data, and as a result,
CodePudding user response:
This three, respectively is a, b, ab associated query data
Select * from a LEFT JOIN b on b.n ameid=a.n ameid associated SQL