My DB knowledge is quite limited and I am trying to delete a row with the following query:
DELETE FROM table
WHERE column in (select sequence.CURRVAL FROM DUAL);
This is used in a .sql to clean up the database after integration tests are run in Maven. I have Googled it but still haven’t found an answer for the delete statement to work. Any help is appreciated!
You can’t use a CURRVAL in a DELETE statement, as you can read here: http://www.orafaq.com/wiki/ORA-02287
But since you are using SQL scripts, you can do it like this in SQL*Plus:
Regards,
Rob.