you arent committing, you are destroying your table structures and messing up your transaction by being in a plsql block and changing ddl right after a dml.
you arent returning out of your blocks
just everything about this is destructive and potentially table data destroying
and your logic is flawed on your if.
hey if i have rows, add another column thats bigger, take the old column and null it, and then move the data from the old column to the new one. then totally wipe out and fu*k up my old data even though the new data isnt committed. Then no matter what grow the old column, and then copy the old data from the new column back to the modified new column, and drop the new column even though its data wasnt committed.
really doesnt make alot of sense to me
because the end goal is just to modify cas2id to varchar2(128)
so why didnt you just do that in the first place?
while data still was in it