-----------------------------------------------------------------
-- PL/SQL: Table-based record (Section 4.7.1)                   -
-- Chapter 4; Oracle Programming -- A Primer                    -
--            by R. Sunderraman                                 -
-----------------------------------------------------------------

DECLARE
  customer_rec customers%rowtype;
BEGIN
  select * 
  into   customer_rec 
  from   customers 
  where  cno = '4444';
  if (customer_rec.phone is null) then
    dbms_output.put_line('Phone number is absent');
  else
    dbms_output.put_line('Phone number is ' || customer_rec.phone);
  end if;
END;
/
