0

In SQL Server, I know parameter can prevent SQL Injection with detail reason from this answer, and is Oracle the same can prevent SQL injection by using parameters?

This is my C# code:

OracleCommand command = new OracleCommand(querySql);
command.Parameters.Add(new OracleParameter("Column1", OracleDbType.Varchar2, 3, "Value1", ParameterDirection.Input));
command.Parameters.Add(new OracleParameter("Column1", OracleDbType.Varchar2, 6, "Value1", ParameterDirection.Input));
cmd.ExecuteReader();
marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425
yu yang Jian
  • 5,827
  • 6
  • 49
  • 75
  • 1
    Yes, SQL injection is a **general** problem for any database system that uses SQL as it's query language - it's **not** specific to SQL Server..... and the solution of using **parametrized queries** is also generally the best accepted practice to avoid SQL injection – marc_s May 22 '20 at 08:50
  • ok, if there's Oracle Master that can explain working detail in Oracle is appreciated by readers. – yu yang Jian May 22 '20 at 09:06