'How to write multiple statements in if in oracle

DECLARE
    NO_OF_ROWS_A NUMBER := 0;
    NO_OF_ROWS_E NUMBER := 0;
BEGIN
    
    FOR OBJ IN (select status from  table1)
    LOOP
    
    if(condition) THEN
    
     UPDATE table2 SET status=1 WHERE condition;
     NO_OF_ROWS_A = NO_OF_ROWS_A+1;
    END IF;
    END LOOP;
END

I am getting error at "NO_OF_ROWS_A = NO_OF_ROWS_A+1;"

Can anyone please tell me what went wrong?



Solution 1:[1]

Offending statement should be

NO_OF_ROWS_A := NO_OF_ROWS_A + 1;
             ^ 
             |
            this

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Littlefoot