Executing Oracle function and getting back a return value
问题 I am using NPoco ORM and trying to get a result from Oracle function. I have tried: public string GetData(int param1, int param2) { var command = "PKG_SOMEPACKAGE.SET_DATA( @p_param1, @p_param2);"; var sql = Sql.Builder.Append(command, new { p_param1 = 10, p_param2 = 20 }); string result = this.Db.ExecuteScalar<string>(sql); return result; } But it doesn't work and returns ORA-00900: invalid SQL statement The Oracle function looks something like: function SET_DATA ( p_param1 IN NUMBER, p