1
當我嘗試執行下面的查詢即時通訊錯誤在第4行如「 ORA-06512:在第5行」,其中「樣本」是動態全局臨時表。動態查詢錯誤
declare max_seq_dp varchar2(20);
cnt number(20);
begin
execute immediate 'select count(*) into cnt from sample';
dbms_output.put_line(cnt);
if (cnt)>0 then
begin
select max(sequence_number) into max_seq_dp
from sample1 where column1 = '2045'
and is_active = 1;
dbms_output.put_line(max_seq_dp);
end;
end if;
end;
感謝
如果(cnt)> 0,那麼改變這個如果cnt> 0然後 – Satya 2013-04-23 09:14:51