Execute Statement or Run Script?

前端 未结 2 1759
深忆病人
深忆病人 2021-01-07 17:58

While entering a SQL statement in Oracle SQL Developer, I noticed that I have two choices. I can either \"Run Statement\" or \"Run Script\". A similar choice seems to be ava

相关标签:
2条回答
  • 2021-01-07 18:02

    Run Statement will give you a list of all the results in a sortable table. It will also only run the statement under the cursor (or highlighted). You will be prompted for bind variables when you run the statement (any place holder with : in front of it).

    E.g.

    select * from customers where customer_id = :id
    

    will prompt for a value for id

    Run Script will execute all statements in the worksheet, and give a text readout of the results. It will not prompt you for the values of bind variables.

    0 讨论(0)
  • 2021-01-07 18:13

    I think "Execute Statement" - mean if you want to get results (resultset) "Run Script" - is something you need to execute but don't need a results, like installing database dump, or upgrade script to add columns to the table etc.

    0 讨论(0)
提交回复
热议问题