Advertisement
fahadkalil

plpgsql_cursor_dvdrental_staff

Aug 26th, 2021
2,019
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Exemplo de cursor implicito (plpgsql)
  2. DO $$
  3. DECLARE
  4.     registro RECORD; -- declaracao mais generica de uma linha, sem indicar tipos de dados      
  5. BEGIN
  6.     FOR registro IN
  7.       SELECT *
  8.       FROM   staff
  9.    LOOP
  10.       raise notice '%', registro.first_name;
  11.    END LOOP;
  12. END;
  13. $$;
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement