why MYSQL limit syntactic is opposite of overloading function in programming language? [closed]
function limit($count,$offset = 0)
{
}
here limit(3); // will work for $offset would get its default value of 0
when we have specific offset value we can do limit(3,10);
but MYSQL limit syntax does opposite it take limit 3 // which is in align with limit(3) but when want to use not default value for offset then we have to do in opposite order limit 10 , 3; where 10 is offset and 3
SELECT * FROM `table` LIMIT 3 OFFSET 10
Why not use this syntax?
It is simply because the designers designed it to be that way. Sounds like a bad answer, but I don't know how one could answer it better.
精彩评论