PL/SQL Two statements

Hello expert,

I need to go to the DBA with a script to delete rows in two tables.


where NOTE_ID = 798105 and SEGMENT_ID in (2359467, 2359468, 2359469);

where NOTE_ID = 798105 and SEGMENT_ID in (2359467, 2359468, 2359469);


But it only executes the first statement

Have tried running the two statements in separate queries with positive
result. But when combined only the first goes.

Was told by the DB expert that the semicolon is needed after
the first statement, Is he wrong?


Allen in Dallas
Allen PittsBusiness analystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What tool do you or your DBA use to execute the script ?
Allen PittsBusiness analystAuthor Commented:
I execute the script in Oracle SQL Developer V 3.1.07
Allen PittsBusiness analystAuthor Commented:
Hello flow01,

Figured it out.
I clicked the green triangle icon (Run Statement).
But I should have been clicking the icon next to the Run Statement
icon which is the Run Script (looks like a piece of paper with a green triangle).

This made both statements run.

I don't  use that normally, but in Oracle pl/sql developer when  there are more statements by default only 1 is executed (where the cursor is located).
But if you select al statement and use the  'run' button, all statements are executed.

And I just tried SQL Developer  Version and that works the same : select all statement  and run.
But it works also without selecting:
the first run symbol (ctrl-enter) runs 1 statement (if nothing is selected)
the second run symbol (f5)  runs the script.

So try if that works in your version also.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
You already found it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.