SQL injection is a code injection technique that exploits a security vulnerability occurring in the database layer of an application, such as queries.
The vulnerability is present when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed and thereby unexpectedly executed. It happens from using poorly designed query language interpreters.
See famous example – Bobby Tables incident
NOTE: The content of this tag was originally posted at StackOverflow.com