dkfr.net
当前位置:首页 >> 新人在此 SELECT 语句中缺少 INTO 子句,该怎么解决... >>

新人在此 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') ;

这个看一下对你是否有帮助埃查询多行内容用游标啊 declare cursor mycur is select * from checkTmp order by expressID; myrecord checkTmp%ROWTYPE; BEGIN OPEN mycur; FETCH mycur INTO myrecord; WHILE mycur%FOUND LOOP DBMS_OUTPUT.PUT_LI...

select出来的结果要放到变量中去,select ... into .... from ... where ....

--应该这样改吧 create procedure p_findUser (@v_id number) as select id,name,pwd,email,tel,birthday,grade from users where id= @v_id;;

网站首页 | 网站地图
All rights reserved Powered by www.dkfr.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com