有没有办法为IN的子句提供一个未定义的集合?
如:
select * from ABC WHERE MY_ID IN (X TO Y)
示例:如果我将X赋予3,将Y赋予8;
select * from ABC WHERE MY_ID IN (3, ... , 8)
这应该与:
相同select * from ABC WHERE MY_ID IN (3, 4, 5, 6, 7, 8)
答案 0 :(得分:6)
你需要这个
select * from ABC WHERE MY_ID between 3 and 8
答案 1 :(得分:2)
也可以试试这个......
select * from abc where id >= 3 and id <=8
答案 2 :(得分:1)