我运行此查询以使用 OracleCommand 读取带有输出参数的记录计数:
var query = "declare MyCount number; begin SELECT COUNT(*) INTO :MyCount FROM T_ISSUE; end;";
这个工作正常。
但是,如果我将查询分成两行,如下所示:
var query = @"declare MyCount number;
begin SELECT COUNT(*) INTO :MyCount FROM T_ISSUE; end;";
我得到以下异常:
System.Data.OracleClient.OracleException: ORA-06550: line 1, column 25:
PLS-00103: Encountered the symbol "" when expecting one of the following:
begin function package pragma procedure subtype type use
<an identifier> <a double-quoted delimited-identifier> form
current cursor
The symbol "" was ignored.
有人知道为什么吗?
谢谢你的帮助。