You have some great answers.
At the most base level?
Well, you can in code risk so called "in line" SQL statements. However, in "any" case in which ANY of that SQL used involves ANY kind of user input?
Then no chances are to be taken in such cases, and you can't use "string" concatenations in code for your SQL. Follow the above simple rule, and you covered 99% of SQL injection cases.
So, for example, say we have a simple gridview, and the user is to click on a button. (to select the row, maybe view that one record).
Can you risk SQL concatenation in that case? Well, yes, you actually can, providing you use 100% server side code for that row click, and don't pull or use any user input for the database ID value you use in this example.
So, don't ever take user input, and use with SQL statements as concatenated "strings" code.
Else you risk this:
