I wrote query which I got no return value as follows:
con.Open();
OracleCommand cmd= CreateCommand();
cmd.CommandText = $"INSERT INTO {"Customer".GetDoubleQuoted()}({"City".GetDoubleQuoted()},{"CompanyName".GetDoubleQuoted()} , {"ContactName".GetDoubleQuoted()} ,{"Country".GetDoubleQuoted()},{"CustomerID".GetDoubleQuoted()},{"Phone".GetDoubleQuoted()}) VALUES ('Chicago', 'Amisys','Jwk', 'USA','aaa', '123456') \n Returning {"City".GetDoubleQuoted()} into :city";
cmd.Connection = con;
cmd.Parameters.Add(new OracleParameter
{
ParameterName = ":city",
OracleDbType = OracleDbType.Varchar2,
Direction = ParameterDirection.Output
});
cmd.ExecuteNonQuery();
var value= cmd.Parameters[":city"].Value.ToString();
Could someone help me finding out why value doesn't come out?
Thanks in advance. joon