Reputation: 23
select * from tableName where somecode = '$$$$$$$&8Y~$$$$'
when I ran this query in SQLPlus Worksheet, I get output like this:
Enter value for 8y: old 2: And somecode = '$$$$$$$&8Y~$$$$') new 2: And somecode = '$$$$$$$OEM_sqlplus_input_finished~$$$$')
no rows selected
My question is, if this query is executed as it is from ASP.NET application using OracleConnection and OracleCommand (Command type as text), will it get executed as query 1 or 2?
1. select * from tableName where somecode = '$$$$$$$&8Y~$$$$'
2. select * from tableName where somecode = '$$$$$$$OEM_sqlplus_input_finished~$$$$'
If later is the case, how I disable parameter replacing like this for current OracleConnection session only (revert back to whatever it was after closing connection)?
(It is old .NET 1.1 application, so OracleConnection and OracleCommand are used)
Upvotes: 0
Views: 138
Reputation: 78915
The replacement of variables starting with an ampersand (&) is a functionality provided by SQL*plus. It's neither SQL nor PL/SQL. SQL Developer implements most of these SQL*plus extensions.
So, in your .NET application, the ampersand has no special meaning.
You can also turn it off in SQL*plus and SQL Developer by executing:
SET DEF OFF
Upvotes: 1