I have written couple of sql scripts in a text file and saved them with a .sql extension. I want to execute these scripts in the sql plus terminal without having to manually type the standalone sql scripts, but i'm struggling with it. If someone could list out the steps involved I would be very grateful.
I could copy and paste those scripts in the terminal but that is not what I am looking at, I want to see if there is a way to provide the path to the scripts in the sql plus editor.
If your filename is myQueries.sql, just type
SQL>@/path/to/my/query/myQueries.sql
SQL>/
来源:https://stackoverflow.com/questions/39043872/executing-a-sql-file-in-sql-plus-terminal