Home > database >  Database bosses, save the children
Database bosses, save the children

Time:10-07

Bosses, database using SQL statement how to achieve the goal of table a and table b merged into table c o

CodePudding user response:

1,
The select a.f ield1, a.f ield2, a.f ield3, a.f ield4, a.f ield5, b. ield6, b. ield7
From a full outer join b
On a.f ield3=b. ield3 and a.f ield4=b. ield4 and a.f ield5=b. ield5


2,
The select a.f ield1, a.f ield2, a.f ield3, a.f ield4, a.f ield5, 'field6,' field7
From a
Union all
Select "field1, 'field2, b. ield3, b. ield4, b. ield5, b. ield6, b. ield7
The from b

CodePudding user response:

Has been successfully, thanks for bosses
  • Related