代码:

stmt, err := db.Prepare("begin TestPro(:1,:2,:3);end;")
if err != nil {
    return "",err
}
defer stmt.Close()
var mail string = "1"
var pwd string = "2"
var op_re_list string
var result sql.Result
result,err = stmt.Exec(mail,pwd,sql.Out{Dest: &op_re_list})

if err != nil {
    log.Fatal(err)
}

op_re_list 的类型是sys_refcursor

用string类型直接报类型错误

2018/04/26 18:52:45 ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'TESTPRO'