轉自:http://bbs.csdn.net/topics/300191423.net
從第一引號向後,若是遇到第二個引號,則看這個引號後面時候有緊挨着的引號,若是有則第二個引號被轉義,即該保留該引號後面緊跟的那個引號。用法舉例:
declare
v_char varchar2(2) :='zz';
begin
execute immediate 'delete from aa where b='||''''||v_char||'''';
end;
或者
declare
v_char varchar2(2) :='zz';
begin
execute immediate 'delete from aa where b='''||v_char||'''';
end;im