Your SQL is correct but the problem is TOAD restrict Statements and Scripts for each button. I assume the cause of the error is you are trying to run ALTER TABLE
command using Execute Statement
or F9
key. First of all, let's see what is different between Statement and Script
Execute Statement will give you a list of all the results in a
sortable table. It will also only run the statement under the cursor
(or highlighted). You will be prompted for bind variables when you run
the statement (any placeholder: in front of it).
E.g.
select * from customers where customer_id = :id
will prompt for a value for id
Execute Script will execute all statements in the worksheet,
and give a text readout of the results. It will not prompt you for the
values of bind variables.
https://mcmap.net/q/243999/-execute-statement-or-run-script
As you can understand ALTER TABLE returns only a text output. So you have to use Execute as Script
or F5