If you’re getting a SQLite error that reads ‘Parse error: near “LIMIT”‘, it could be that you’re trying to use the LIMIT
clause when using the VALUES
clause as a stand alone statement.
SQLite doesn’t allow us to apply the LIMIT
clause against the VALUES
statement.
However, there is a work around. Below is an example of how we can apply the LIMIT
clause against the VALUES
statement.