【发布时间】:2022-01-03 16:27:24
【问题描述】:
您好,我想将 select 语句的值存储到变量中,然后在过程中使用该变量更新我的表,但出现错误。我仍然不知道它只返回一列然后也存在以下错误。 精确提取返回的行数超过了请求的行数。
这是演示代码的示例。任何人都可以给我一个替代方法,我可以在这里做些什么来使它工作,因为我有很多这样的 plsql 语句来填充表列
create or replace procedure pcountry (country IN Varchar) is
var_date Date;
begin
select date into var_date from countrytable where country=country;
update newtable
set date=var_date
where country=country
commit;
end pcountry;
【问题讨论】:
标签: sql oracle stored-procedures plsql oracle11g