有没有办法在 PL/SQL 匿名块中使用替换字符串?我尝试DATE_DIFF
在 PL/SQL 匿名块中使用我的替换字符串,&DATE_DIFF.
但它给出了以下错误。
ORA-06550: line 13, column 18: PLS-00103: Encountered the symbol "&" when expecting one of the following: ( - + all case mod new null <an identifier> <a double-quoted delimited-identifier> <a bind variable> continue any avg count current max min prior some sql stddev sum variance execute forall merge time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character set s
我该如何解决这个问题?
更新
在 PL/SQL 匿名块中使用替换字符串的示例代码。
DECLARE
v_date_diff NUMBER;
BEGIN
v_date_diff := &DATE_DIFF.; // this didn't work
END;