I'm new to Oracle (have a SQL Server background). I'm trying to execute this anonymous block but it is failing with ORA-06550. I feel like that I may not understand what can be done and not done in an anonymous block. If someone would be so kind to educate me, I'd appreciate it.
BEGIN
ALTER TABLE <SCHEMA_NAME>.<TABLE_1_NAME> MODIFY <FIELD_NAME> VARCHAR2(50);
ALTER TABLE <SCHEMA_NAME>.<TABLE_2_NAME> MODIFY <FIELD_NAME> VARCHAR2(50);
ALTER TABLE <SCHEMA_NAME>.<TABLE_3_NAME> MODIFY <FIELD_NAME> VARCHAR2(50);
END;
Error:
ORA-06550: line 2, column 1:
PLS-00103: Encountered the symbol "ALTER" when expecting one of the following:( begin case declare exit for goto if loop mod null pragma
raise return select update while with
<<
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge
json_exists json_value json_query json_object json_arrayThe symbol "lock was inserted before "ALTER" to continue.
ORA-06550: line 2, column 49:
PLS-00103: Encountered the symbol "" when expecting one of the following:, in
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action: