在oracle执行存储过程出现: 在此select语句中缺少into子句
oracle的存储过程中不能直接select,必须要将结果放到变量中,即类似select count(*) into count1 from checkTmp这种写法。
直接写成select * from checkTmp order by expressID肯定会报错的,因为oracle不知道你要select干什么。
在此select 语句中缺少into子句【怎么错了,谢谢】
在编写存储过程或是触发器时,必须把查询出的结果存入于结果类型相同的变量中,上面的sql应改为
select to_char(count(*))as KNUM into 变量名称 from tdkdy t
where to_char(time,'yyyy')='year' and rownum = 1
group by to_char(time,'mm') ;