为什么dbms

编程入门 行业动态 更新时间:2024-10-16 20:21:55
本文介绍了为什么dbms_job.submit在同一代码可以立即执行时不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

这是我要使用dbms_job.submit的第一时间.

This is the frist time that I am going to use dbms_job.submit.

以下代码不起作用:

declare i_job_no BINARY_INTEGER; begin dbms_job.submit(JOB => i_job_no, what => 'declare x number; begin x := f_threads(''my_program'', '|| 6058883 ||' , '|| 2 || '); end;', next_date => sysdate); dbms_output.put_line(i_job_no); end;

,但同样的事情可以立即执行.有人可以帮忙吗?!

but the same thing works fine with execute immediate. Can anyone help?!

> declare i_job_no BINARY_INTEGER; begin execute immediate 'declare x number; begin x := f_threads(''my_program'', '|| 6058883 ||' , '|| 2 || '); end;'; end;

谢谢!

推荐答案

这样,您的pl/sql块将起作用:

in this way your pl/sql block will work:

declare i_job_no BINARY_INTEGER; begin dbms_job.submit(JOB => i_job_no, what => 'declare x number; begin x := f_threads(''my_program'', '|| 6058883 ||' , '|| 2 || '); end;', next_date => sysdate); dbms_output.put_line(i_job_no); commit; end;

您在代码中缺少commit

问候 乔娃

更多推荐

为什么dbms

本文发布于:2023-11-17 02:38:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1608502.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:dbms

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!