q and use
any convenient delimiter, single or multibyte, or any of the [ ], { }, ( ), or < >
character pairs.
select q'x's'dfsdfx' from dual;
select q'!'s'dfsdf!' from dual;
得到的结果是's'dfsdf
The new quote operator can also be used with the new SQL_TUNE function, which
takes a SQL statement as its argument. For example:
EXECUTE SQL_TUNE –
('select * from emp where name LIKE ''%DBMS_%''', ...)
With the new quote operator, you can rewrite this statement as:
EXECUTE SQL_TUNE –
(q'!select * from emp where name LIKE '%DBMS_%'!')
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/6456/viewspace-112226/ ,如需转载,请注明出处,否则将追究法律责任。