fahadkalil

plpgsql_procedure_dvdrental_staff

Aug 26th, 2021 (edited)
1,722
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. Nome do procedimento: get_user_pass_from_id
  3. IN: in_id_funcionario
  4. INOUT: out_usuario
  5. INOUT: out_senha
  6. */
  7.  
  8. create or replace procedure get_user_pass_from_id(IN in_id_funcionario INT, INOUT out_usuario VARCHAR, INOUT out_senha VARCHAR)
  9. language plpgsql as $$
  10. declare
  11.     -- declaracao de variaveis
  12. begin
  13.     -- corpo da procedure
  14.     select username, password INTO out_usuario, out_senha
  15.     from staff
  16.     where staff_id = in_id_funcionario;
  17. end;
  18. $$
  19.  
Add Comment
Please, Sign In to add comment