I am using oracle sql developer. In that code, I need to use execute immediate statement for creating sequence.
My requirement is to check whether the new sequence to be created is present or not. If it is there, then the code has to replace it. If it is not there, then the code has to create it.
But when I used the create or replace statement, it errors out. If I used create statement alone, its working fine.
Then, I used some case statements to find whether the sequence that we are trying to create exists or not and then I have used the create statement alone to do this.
My question is why we are not able to use the create or replace statement inside execute immediate statement?