Use UNION ALL SELECT 34,34 to merge a dummy row into the original query results. This helps an attacker determine the number of columns required for a successful data dump.

(ACM Digital Library).

by Halfond, Viegas, and Orso (IEEE Xplore).

This is one of the most cited papers in the field. It provides a comprehensive taxonomy of different SQL injection types, including UNION -based attacks like the one in your query.