我有以下查询:
select
name, description
from tblproducts
right join tblproductssales
on tblproducts.ID = tblproductssales.Product_ID
如何使用子查询获取相同的检索数据?
答案 0 :(得分:2)
SELECT
(SELECT name FROM tblproducts WHERE ID = A.ProductID) AS name,
(SELECT description FROM tblproducts WHERE ID = A.ProductID) AS description
FROM tblproductssales A