+ 2
in the LIMIT section it is said that the offset starts from 0 then why in this BETWEEN section rhe example is not like that...we are declaring from 3 to 7 and it is displaying from 3-7...as per said in the LIMIT it must have started from 4...can anyone explain this please???
2 Respuestas
+ 1
Yes, you have a valid doubt..
But the thing is in limit we are not specifing any column name, by default SQL start counting row number.. And it stated that row number start from zero. So that's why limit starts from zero...
On other hand, in BETWEEN we specify column name.. So SQL will search for that column and in that column it will search for the value we have written in our condition... And starts from there only..
In short limit, counts the row number and between will search for our specified value.
+ 1
thank you....now I got the clarity :-)