有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java Hibernate:加入标准

嗨,我需要使用以下标准

Select * from product pd, (Select productID pd1 from ... where ...) tpd1, 
(Select productID pd2 from ... where ...) tpd2
where pd.productID = tpd1.pd1 and pd.productID = tpd1.pd2

我能知道这是否可能吗

最初的SQL是在特定条件下使用的

Select * from product pd where productID in (Select productID pd1 from ... where ...) and 
productID in (Select productID pd2 from ... where ...) 

但是获得结果需要很长时间,使用join SQL语句我可以更快地获得结果

有什么帮助吗


共 (0) 个答案