Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法为 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)
你需要这个
select * from ABC WHERE MY_ID between 3 and 8
这个也可以试试。。。
select * from abc where id >= 3 and id <=8
怎么样BETWEEN
BETWEEN
SELECT * FROM ABC WHERE MY_ID BETWEEN 3 AND 8