字符串里的空格都不会留,单引号都不会拼接,create table as 能写成drop table as先学拼接字符串打印字符串吧,存储过程没问题。
stmt:='drop table zhaoli_AutoRoam_bill_rpt' 是我写错了,变异的时候出现了这个 PLS-00103: Encountered the symbol "1260" when expecting one of the following: . ( * @ % & = - + ; < / > at in mod not rem <an exponent (**)> <> or != or ~= >= <= <> and or like between is null is not || is dangling 错误,1260那个地方该怎么写呢? 另外如果SQL语句本身就有单引号,那么在进行拼接的时候,如何写。望解答一下
select * from dual where dummy = 'X' 拼接成字符串是 stmt:= 'select * from dual where dummy = ''X''' ;
where usage_type_id='1260' 变成字符串是stmt:= 'where usage_type_id=''1260'''
PLS-00103: Encountered the symbol "1260" when expecting one of the following: . ( * @ % & = - + ; < / > at in mod not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like
between is null is not || is dangling
错误,1260那个地方该怎么写呢?
另外如果SQL语句本身就有单引号,那么在进行拼接的时候,如何写。望解答一下
stmt:= 'select * from dual where dummy = ''X''' ;