Can I avoid all SQL-injection attacks by using parameters?
And don’t worry about any thing in SQL injection in this case?
Or are there some types of these attacks which require more care on the part of the programmer?
Can I avoid all SQL-injection attacks by using parameters? And don’t worry about any
Share
No, you can’t avoid all SQL injection attacks by using parameters. Dynamic SQL is the real issue, and this can occur in stored procedures as well as in your application code.
E.g., this is prone to a SQL injection attack: your parameterized query passes a username to a stored procedure, and within the stored procedure the parameter is concatenated to a SQL command and then executed.
For an example of many kinds of SQL injection attacks, see this SQL Injection Cheat Sheet. You will see that simply escaping single quotes is just scratching the surface, and that there are many ways around that.