admin 2018.12.10 23:58 Views : 282
DECLARE
NUM NUMBER;
ID NUMBER;
EMAIL_COUNT NUMBER;
BEGIN
SELECT COUNT(*) INTO EMAIL_COUNT FROM TEST_EMAIL;
FOR i IN 1..EMAIL_COUNT
LOOP
UPDATE TEST_EMAIL
SET
NUM = i
WHERE ID = i;
END LOOP;
Commit;
End;