Friday, 25 May 2012

What is the error in the following code(Given Below)? | PL SQL

BEGIN
....
IF valid THEN
...
GOTO update_row;
ELSE
....
<<update_row>>
UPDATE t_employees SET ...
END IF;
END;
 The code shows an illegal usage of the GOTO statement. The statement is forcing the control to move to the update_row sub program, which is a part of the ELSE condition. This is not allowed because the GOTO statement cannot be used to branch within an IF-ELSE block.