You need to be careful with your definitions. 'Parameters' can mean a number of things; parameters to a stored procedure, for example, don't protect you at all in and of themselves. To use Java as an example:
sql = "exec proc_SearchForUser '" + userNameToSearch + "'";
is no better or worse than the raw
sql = "SELECT * FROM Users WHERE userName = '" + userNameToSearch + "'";
and is just as susceptible to the username
';DROP TABLE users;--
Parameterized queries, on the other hand, ARE safe. They might look like
PreparedStatement statement = con.prepareStatement("SELECT * FROM Users WHERE userName = ?");
or indeed
PreparedStatement statement = con.prepareStatement("exec proc_SearchForUser ?");
The reason this is safe is because when you fill in the value... using, say,
statement.setString(1, userName);
then the string -- even one like "';DROP TABLE users;--" -- will be properly escaped by the DB engine and rendered innocuous.
It's still possible to screw it up -- for example, if your stored procedure just builds a SQL string internally and executes it, trusting the input -- but prepared statements with parameters mean that no unescaped data will ever get to the DB server, completely cutting off that attack vector.