select `product_list`.`ProductID`,`software_shop_detail`.`Price` + `hardware_shop_detail`.`Price` price
from `product_list`,`software_shop_detail`,`hardware_shop_detail`
where
`product_list`.`ProductID` = `software_shop_detail`.`ProductID`
and
`product_list`.`ProductID` = `hardware_shop_detail`.`ProductID`
order by `product_list`.`ProductID`怎么查不出数据。在线等。
from `product_list`,`software_shop_detail`,`hardware_shop_detail`
where
`product_list`.`ProductID` = `software_shop_detail`.`ProductID`
and
`product_list`.`ProductID` = `hardware_shop_detail`.`ProductID`
order by `product_list`.`ProductID`怎么查不出数据。在线等。
`product_list`.`ProductID` = `software_shop_detail`.`ProductID` and `product_list`.`ProductID` = `hardware_shop_detail`.`ProductID`
的记录吗?
估计没有!
还真的没有。只有满足`product_list`.`ProductID` = `software_shop_detail`.`ProductID`或者满足`product_list`.`ProductID` = `hardware_shop_detail`.`ProductID`
的,因为`software_shop_detail`.`ProductID`是1-8,`hardware_shop_detail`.`ProductID`
是10-20.但是我要同时查出所有产品及价格,在product_list表中是没有价格的,我该怎么查。
参考一下这个贴子的提问方式http://forum.csdn.net/BList/OtherDatabase
1. 你的 create table xxx .. 语句
2. 你的 insert into xxx ... 语句
3. 结果是什么样,(并给以简单的算法描述)
这样想帮你的人可以直接搭建和你相同的环境,并在给出方案前进行测试。