-- vars.sql

DECLARE
   lname VARCHAR2(25);
   fname VARCHAR2(10);
   city VARCHAR2(10) := 'Denver';
   city2 CHAR(10) := 'Denver';
   result BOOLEAN;
BEGIN
   lname := 'Smith  '; -- String holds 7 bytes (note the extra spaces)
   --fname := 'Christopher'; -- Too long for this datatype
   IF city = city2 THEN   -- FALSE (city2 is space-padded, city isn't)
      result := TRUE;
   ELSE 
      result := FALSE;
   END IF;

   IF city2 = 'Denver      ' THEN -- TRUE (Comparing a CHAR to a CHAR,
                                  -- the smaller CHAR gets space padded)
      result := TRUE;
   ELSE
      result := FALSE;
   END IF;

   IF RTRIM(city2) = 'Denver' THEN  -- TRUE (remove space padding first.)
      result := TRUE;
   ELSE
      result := FALSE;
   END IF;
END;
/
