oracle存储过程中给变量赋值带有特殊符号
例如:CREATEORREPLACEPROCEDUREttISv_sqlVARCHAR2(10000);BEGINv_sql:='createtableaaasselec...
例如:
CREATE OR REPLACE PROCEDURE tt IS
v_sql VARCHAR2(10000);
BEGIN
v_sql:='create table aa as select * from bb where bb.b1 like '123%'';
EXECUTE IMMEDIATE v_sql;
END;
在给v_sql赋值时,如何对%进行处理 展开
CREATE OR REPLACE PROCEDURE tt IS
v_sql VARCHAR2(10000);
BEGIN
v_sql:='create table aa as select * from bb where bb.b1 like '123%'';
EXECUTE IMMEDIATE v_sql;
END;
在给v_sql赋值时,如何对%进行处理 展开
1个回答
展开全部
CREATE OR REPLACE PROCEDURE tt IS
v_sql VARCHAR2(10000);
BEGIN
v_sql:='create table aa as select * from bb where bb.b1 like ''123%''';
--EXECUTE IMMEDIATE v_sql;--这句你可以先屏蔽掉
dbms_output.put_line(v_sql);--把v_sql打印出来看看
END;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询