Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE
- v_nome cliente.nome%TYPE;
- v_uf saques.cod_uf%TYPE;
- v_total saques.qtd_total_saque%TYPE;
- BEGIN
- SELECT c.nome, s.cod_uf INTO v_nome, v_uf
- FROM cliente c, cidade_agencias ag, saques s
- WHERE c.idade > 50
- AND c.codcid_ag = ag.codigo
- AND ag.uf = s.uf;
- UPDATE saques
- SET qtd_total_saque = qtd_total_saque + 1000
- WHERE cod_uf = v_uf
- RETURN qtd_total_saque INTO v_total;
- DBMS_OUTPUT.PUT_LINE('c/ acrescimo: '|| v_total|| ' cliente: '||v_nome);
- END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement