Skip to main content

How SQL Injection Works

Learn How SQL Injection Works (SQL Injection, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Introduction SQL injection happens when untrusted input is concatenated into SQL text, so the input is parsed as SQL code instead of a value . The attacker changes the structure of the statement, not just its data.

More lessons in SQL Injection