Hoax LIMIT value
Is there a value that used with a LIMIT clause means nothing or no l开发者_如何学Goimit?
I'd expected that 0
would be that value but it obviously isn't:
SELECT * FROM items LIMIT 0 -- returns 0 rows
Use a value far outside the number of records you're actually retrieving:
LIMIT 0, 18446744073709551615
Quote:
To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter.
精彩评论