- create or replace procedure test(typeuse varchar2) is
- begin
- DECLARE
- CURSOR lappin IS
- select id from lianxi;
- BEGIN
- for usething in lappin loop
- update lianxi
- set lianxi.enter_size = (
- select c.dic_code from ceshi c where c.dic_type =typeuse and c.dic_value = (
- select s.dic_value from sys_dic s where s.dic_type = typeuse and s.dic_code = (
- select lianxi.enter_size from lianxi where lianxi.id = usething.id
- )
- )
- ) where lianxi.id = usething.id;
- END LOOP;
- END;
- end test;
sql 游标简单的例子
最新推荐文章于 2023-01-15 18:37:47 发布