0、例如:select * from T1,T2 where T1.a=T2.a
1、连表查询 <=> join(inner join)内连接查询
数据源:
Persion表:
Orders表:
//使用连表查询
SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
FROM Persons,Orders
WHERE Persons.Id_P = Orders.Id_P
//使用join查询
SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
FROM Persons
INNER JOIN Orders
ON Persons.Id_P = Orders.Id_P
ORDER BY Persons.LastName
结果: