Hi guys Ive been trying to implement simple code that is changing the table data from null to not null. What i came up so far is this:

```
Declare
   mi number(2);
   ma number(2);
BEGIN
   SELECT MIN(ColumnA) INTO mi from TABLEA;
   select MAX(ColumnA) into ma  from TableA;
   FOR a in mi .. ma LOOP
     IF a = 3 THEN
       update TableA SET ColumnB = '0' WHERE ColumnB is null;
       execute immediate 'alter table TableA modify ColumnB not null';
     ELSE
       execute immediate 'alter table TableA modify ColumnB null';
     end if;
   END LOOP;
END;

```

The code seems to be working it go straight to the ELSE statement. The min value of columnA is 1 and the max value is 6.

I believe i am missing something in the if statement.

The logic behind this is that if ColumnA contain record 3 then the COLUMN B Should be modified to be not null.