do LANGUAGE plpgsql $$ declare top integer; row_org dbo.a_org_type%rowtype; begin /* Insert real code here */ select into row_org * from dbo.a_org_type order by id desc limit 1; top := row_org.id + 1; for idx in 1..5 loop insert into dbo.a_org_type(id, des) values(top, ‘shang hai ‘ || top); top := top + 1; end loop; end; $$
原文地址:https://www.cnblogs.com/jonney-wang/p/9976987.html
时间: 2024-10-31 08:13:46