I am trying to run this statement but it is not working
EXECUTE IMMEDIATE 'UPDATE TPERSON SET NAME = 'john' WHERE NAME = 'John'';
In simple cases use doubling every qoute
EXECUTE IMMEDIATE 'UPDATE TPERSON SET NAME = ''john'' WHERE NAME = ''John''';
Still there is a better option in Oracle - text blocks, where any inner quotes need no escaping
EXECUTE IMMEDIATE q'[UPDATE TPERSON SET NAME = 'john' WHERE NAME = 'John']';
More information and examples here