Home >Database >Mysql Tutorial >Oracle对字符转义的处理

Oracle对字符转义的处理

WBOY
WBOYOriginal
2016-06-07 17:02:271255browse

以前总是忘记Oracle单引号转义,为了以后工作方便,现在记录下来

以前总是忘记Oracle单引号转义,,为了以后工作方便,现在记录下来

SQL> select ''''||nvl(sql_id,prev_sql_id)||'''' sql_id ,  ',' ||nvl(sql_child_number,prev_child_number) sql_child_number from v$session where sid=159;

SQL_ID          SQL_CHILD_NUMBER
--------------- -----------------------------------------
'62d7qphq2zx20' ,0
对于单引号的转义 只需要 '''' 就可以了

select object_name from test where object_name like 'I/_%' escape'/';

对于其他字符的转义 ,可以利用 ORACLE内置的escape来转

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn