Home > Database > Mysql Tutorial > Oracle中的转义字符用法

Oracle中的转义字符用法

WBOY
Release: 2016-06-07 17:26:30
Original
1639 people have browsed it

在oracle中字符_表示匹配单字符,如下若需要删除所有V_2_开头的视图,则需要对_进行转义。使用escape

1. 使用动态SQL时发现的问题,,

在字符串中还要使用单引号怎么办呢,使用转义字符,转义字符正是单引号本身

v_cursor%notfound;
v_sql:=';
v_cur:=dbms_sql.open_cursor;
dbms_output.put_line(v_sql);
dbms_sql.parse(v_cur,v_sql,dbms_sql.native);
dbms_sql.close_cursor(v_cur);
end loop;
close v_cursor;
end;

2. 使用转义字符使用escape

在Oracle中字符_表示匹配单字符,如下若需要删除所有V_2_开头的视图,则需要对_进行转义。使用escape

;

linux

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template