sql将几张表的数据合并到一张表里面一行显示
比如:
A表:
ID Name Age
1 LiLei 23
B表:
ID Weight Height
1 75 175
实现结果:
C表:
ID Name Age ID Weight Height
1 LiLei 23 1 75 175
SQL语句:
Select A.ID,A.Name,A.Age,B.ID,B.Weight,B.Height from A,B ;
比如:
A表:
ID Name Age
1 LiLei 23
B表:
ID Weight Height
1 75 175
实现结果:
C表:
ID Name Age ID Weight Height
1 LiLei 23 1 75 175
SQL语句:
Select A.ID,A.Name,A.Age,B.ID,B.Weight,B.Height from A,B ;