Script to run other scripts in sqldeveloper

早过忘川 提交于 2019-12-04 18:30:28

问题


I have a number of scripts used to build a database. These need to be executed in a certain order. Is it possible to create a script to run other scripts in SQL Developer (1.5.3)?

I know I can do this with sqlplus, but I was hoping there's a similar ability I just don't know about.


回答1:


The SQL*Plus synthax works (with run script):

@script arg1 arg2 ... argn

or

@"/path/to/directory/script" arg1 arg2 ... argn



回答2:


SqlDeveloper should be able to use the same syntax as SqlPlus, i.e.

@@ script1
@@ script2
@@ script3

This will execute script1.sql, script2.sql and script3.sql in order.



来源:https://stackoverflow.com/questions/1367406/script-to-run-other-scripts-in-sqldeveloper

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!