+ 1
Can we replace BETWEEN X AND Y by > and < !!?
SELECT * FROM people WHERE id BETWEEN 10 and 21 ; ................................,..,., it will be :: ..................................... SELECT * FROM people WHERE id>10 and id<=20 ;
5 ответов
+ 4
Yes, You can use anyone of them and there is no performance difference also. So you can use anything as your wish.
+ 3
thanks
+ 2
Yes you can... but the where clause should be
where id >= 10 and id <= 21
as the between clause includes the lower and upper bounds.
+ 2
Of course! Make sure you include the equal sign in the comparison if you want to catch the bounds of your interval
+ 1
Of course