我们知道& 是一个声明使用变量的提示符,当需要显示&时,需要使用 转义符 \:
SQL> select '\& as a char' xx
2 from dual
3 where dummy = '&VAL';
Enter value for val: X
old 3: where dummy = '&VAL'
new 3: where dummy = 'X'
XX
-----------
& as a char
Elapsed: 00:00:00.00
我们知道& 是一个声明使用变量的提示符,当需要显示&时,需要使用 转义符 \:
SQL> select '\& as a char' xx
2 from dual
3 where dummy = '&VAL';
Enter value for val: X
old 3: where dummy = '&VAL'
new 3: where dummy = 'X'
XX
-----------
& as a char
Elapsed: 00:00:00.00