Print text in Oracle SQL Developer SQL Worksheet window

前端 未结 8 495
醉梦人生
醉梦人生 2021-01-30 01:47

I am using Oracle SQL (in SQLDeveloper, using the SQL Worksheet). I would like to print a statement before my select, such as

PRINT \'Querying Table1\';
SELECT          


        
8条回答
  •  春和景丽
    2021-01-30 02:46

    If you don't want all of your SQL statements to be echoed, but you only want to see the easily identifiable results of your script, do it this way:

    set echo on

    REM MyFirstTable

    set echo off

    delete from MyFirstTable;

    set echo on

    REM MySecondTable

    set echo off

    delete from MySecondTable;

    The output from the above example will look something like this:

    -REM MyFirstTable

    13 rows deleted.

    -REM MySecondTable

    27 rows deleted.

提交回复
热议问题