连接查询
1.内连接查询(join... on...获取两张表的数据)
(1)获得全部数据
select * from table_1 t join Products p on t.id=p.ProductID
(2)获得部分数据
select * from table_1 t join Products p on t.id=p.ProductID where t.name
连接查询
1.内连接查询(join... on...获取两张表的数据)
(1)获得全部数据
select * from table_1 t join Products p on t.id=p.ProductID
(2)获得部分数据
select * from table_1 t join Products p on t.id=p.ProductID where t.name