在oracle中选择一个计数到变量中
嗨,我今天一直在尝试这个,但没有任何运气。这个存储过程不起作用:(
CREATE OR REPLACE PROCEDURE LEAD_PURGE(closed IN DATE,
oprtr IN INTEGER,
leadscount OUT INTEGER)
is
BEGIN
SELECT COUNT(*) FROM LEADS_DELETED INTO leadscount;
COMMIT;
END LEAD_PURGE;
Hi I have been trying this today and haven't had any luck. this stored procedure does not work :(
CREATE OR REPLACE PROCEDURE LEAD_PURGE(closed IN DATE,
oprtr IN INTEGER,
leadscount OUT INTEGER)
is
BEGIN
SELECT COUNT(*) FROM LEADS_DELETED INTO leadscount;
COMMIT;
END LEAD_PURGE;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
INTO 子句放错了位置。应该是:
The INTO clause is misplaced. It should be:
您将
into
放在了错误的位置。尝试这样的事情,然后从那里继续:
you have the
into
at the wrong place.Try something like this instead and proceed from there:
另一种方式:
Another way :