Quick Question: Is there a way in SQL Developer to have the DBMS Output window clear when you execute a block?
Quick Answer: CLEAR SCREEN [Oracle Docs]
SQL Developer supports many, and soon to be ALL, SQL*Plus commands. CLEAR is one of them. So just add this to the top of your script. When you execute your script, the Output Panel will clear.
You’ll see there’s the output from the previous run, then we execute, and then we scroll back up the buffer – the previous execution output is gone.
If you’re curious about what all SQL*Plus commands we support, check out the the Help Topic on the subject:
So, if you like the /*csv*/ script output ‘trick’ in SQL Developer, you can use the good ole SQL*Plus SPOOL command to write that output to your CSV file automagically as well.
Just remember, for the SQL*Plus engine to be invoked in SQL Developer – use the ‘Run Script’ or F5 button on the Worksheet toolbar: