I am working on a project for my SQL class and after making a query with subqueries in it i received this error:
ORA-00933: SQL command not properly ended
Automatically I started looking for answers everywhere and after a lot of searching, I thought it would be easier to remake the query step by step, and after butchering it I remained with the error and now it looks like this:
Error at line 3/16: ORA-00933: SQL command not properly ended
Query:
UPDATE requests
SET price = 3
WHERE price= 10;
ROLLBACK;
I simplified it as much as I could but it looks like it stuck with me even if the query is as simple as that.
Any ideas?
You found one way to make it work - use PL/SQL block.
Error you got is due to Apex running everything it finds at once (it isn't related to rollback
, could've been any other statement - select, update, delete, create table, ... whatever).
However, if you first select a single statement and then click the "Run" button, it'll work:
Yet another way to execute statements is to create a script and run that script: