1DECLARE
2 c_id customers.id%type := 8;
3 c_name customerS.Name%type;
4 c_addr customers.address%type;
5BEGIN
6 SELECT name, address INTO c_name, c_addr
7 FROM customers
8 WHERE id = c_id;
9 DBMS_OUTPUT.PUT_LINE ('Name: '|| c_name);
10 DBMS_OUTPUT.PUT_LINE ('Address: ' || c_addr);
11
12EXCEPTION
13 WHEN no_data_found THEN
14 dbms_output.put_line('No such customer!');
15 WHEN others THEN
16 dbms_output.put_line('Error!');
17END;
18