Closed abdelaziz-ouhammou closed 1 month ago
because you are using position of the parameter not name so age =:1
is same as age = :2
and the value of them will be the first value passed to Exec
after SQL string.
to use named parameter see examples.
note that positional mode is the default.
There is an issue when you try to do an update.
the following does not work (no Rows Affected):
db.Exec("UPDATE people set age=:2 where name=:1",name,age)
this works:
db.Exec("UPDATE people set age=:1 where name=:2",age,name)
is this a problem with Oracle or go-ora