浏览 2236 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (2) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2009-09-14
Some example for memory. create or replace procedure TQ_FirstProc is classname_value class %rowtype; begin select * into classname_value from class where class_id='2'; dbms_output.put_line(classname_value.class_number); end TQ_FirstProc; create or replace procedure TQ_Proc2 is classname class.class_name%type; remark class.class_remark%type; begin select class.class_name into classname from class where class.class_number = 1003; if classname = 'Grade one' then remark := '5 students'; elsif classname = 'Grade two' then remark := '10 students'; else remark := '15 students'; end if; update class set class_remark = remark where class.class_number = 1003; commit; end TQ_Proc2; create or replace procedure TQ_PROC3 is num NUMBER(3):=5; rus number(5):=1; begin for i in 1..num loop rus := rus*i; end loop; dbms_output.put_line((rus)); end TQ_PROC3;
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |