Reputation: 3459
Is there a way to give an undefined set for the clause of IN ?
Such as:
select * from ABC WHERE MY_ID IN (X TO Y)
Example: If I give X to 3 and Y to 8 ;
select * from ABC WHERE MY_ID IN (3, ... , 8)
This should be identical to :
select * from ABC WHERE MY_ID IN (3, 4, 5, 6, 7, 8)
Upvotes: 0
Views: 96
Reputation: 14361
Can try this as well...
select * from abc where id >= 3 and id <=8
Upvotes: 2
Reputation: 263803
how about BETWEEN
SELECT * FROM ABC WHERE MY_ID BETWEEN 3 AND 8
Upvotes: 1