I have the following case:
Sample code:
create table abc(aa char(10));
insert into abc values('ABC');
--ABC will be padded with 7 blank spaces
Issue:
Select * from abc where aa in ('ABC');
--This above statement returns one row with value ABC
Declare
v_temp varchar2(10);
v_aa varchar2(10) := 'ABC';
Begin
select aa into v_temp from abc where aa in (v_aa);
dbms_output.put_line(v_temp);
end;
--The above pl/sql block one execution prints nothing but if i replace the select inside that block with "select aa into v_temp from abc where aa in ('ABC');" the value will be printed.
Please advice me on the behaviour.