在 postresql 函数中,我们可以通过 FOR i IN (SELECT ...) 列出表
CREATE OR REPLACE FUNCTION f()
RETURNS trigger AS
$BODY$
DECLARE
table_to_row RECORD;
BEGIN
<<for_loop>>
FOR table_to_row IN SELECT id FROM table1
LOOP
//do something
END LOOP for_loop;
RETURN NULL;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100;
我们如何在 Oracle 11g 中做这样的事情?我需要这部分
FOR table_to_row IN SELECT id FROM table1
LOOP
//do something
END LOOP;