比如如下拼接的sql语句。
vs_where_sql :='and t.subject='''||pSubject||''' || 'and t.ip_address in ('||'''||iIP||'''||') order by t.trace_id desc ) x where rownum<='||pRowCount;
还有:
vs_where_sql := 't.subject in (''DataUploadResponse'',''JsonObjectResponse'', ''GetCertificateData'', ''DataUpload'', ''DataUploadRequest'', ''GetServerTime'') and t.ip_address in ('||'''||pIP||'''||') order by t.trace_id desc ) x where rownum<='||pRowCount;
请高手详解一下。谢谢。
vs_where_sql :='and t.subject='''||pSubject||''' || 'and t.ip_address in ('||'''||iIP||'''||') order by t.trace_id desc ) x where rownum<='||pRowCount;
还有:
vs_where_sql := 't.subject in (''DataUploadResponse'',''JsonObjectResponse'', ''GetCertificateData'', ''DataUpload'', ''DataUploadRequest'', ''GetServerTime'') and t.ip_address in ('||'''||pIP||'''||') order by t.trace_id desc ) x where rownum<='||pRowCount;
请高手详解一下。谢谢。
select 'a'||'b' c1 from dual c1
----------------
ab
看一下结果就明白了
SQL> SELECT 'A'||'B' FROM DUAL;
'A'||'B'
--------
AB
SQL> SELECT '''A'||'B' FROM DUAL;
'''A'||'B'
----------
'ABSQL> SELECT '''A'''||'B' FROM DUAL;
'''A'''||'B'
------------
'A'B
SQL> SELECT '''||A'||'B' FROM DUAL;
'''||A'||'B'
------------
'||AB
SQL> SELECT '''||A'||'B||' FROM DUAL;
'''||A'||'B||'
--------------
'||AB||