oracle程序块
1.匿名语句
DECLARE v_subject number := 0; BEGIN for v in (select id,sex,age from student) loop select count(*) into v_subject from subject where studentid = v.id; if v_subject < 1 then --没报考的 continue; end if; dbms_output.put_line('学生报考科目:'||v_subject); end loop; end;
感谢您的阅读,您的支持是我写博客动力。