我有以下查詢:Transfering右連接到子查詢
select
name, description
from tblproducts
right join tblproductssales
on tblproducts.ID = tblproductssales.Product_ID
我怎樣才能使用子查詢相同retreived數據?
我有以下查詢:Transfering右連接到子查詢
select
name, description
from tblproducts
right join tblproductssales
on tblproducts.ID = tblproductssales.Product_ID
我怎樣才能使用子查詢相同retreived數據?
SELECT
(SELECT name FROM tblproducts WHERE ID = A.ProductID) AS name,
(SELECT description FROM tblproducts WHERE ID = A.ProductID) AS description
FROM tblproductssales A
非常感謝你http://stackoverflow.com/users/2254931/nguy%e1%bb%85n-h%e1%ba%a3i-tri%e1%bb%81u)它工作,謝謝你的反饋 –
哦,沒問題:) –
如果需要任何幫助,我可以談談您的電子郵件或任何聯繫信息。 –
使用JOINS有什麼問題? –
你想在這裏實現什麼? –
'select name,description from tblproducts where ID In(select tblproductssales中的Product_ID)' –