【发布时间】:2021-12-27 06:06:30
【问题描述】:
我想在下面用hibernate做
从 mytable 中选择 id where col1=?和 col2=? 或 col1=?和 col2=? 或 col1=?和 col2=? 或 col1=?和 col2=? ...?
这个条件还是 col1=?和 col2=? , 可以是 1000s , 这是否可以在没有条件的情况下进行休眠
【问题讨论】:
-
select id from mytable where col1 in (...) and col2 in (...)或使用连接到临时表 -
这会给出不同的结果,就像我想要 1,1 或 2,2 但它会给出 1,1 -- 1,2 ,, 2,2