在 sql plus 终端中执行 .sql 文件 [英] executing a .sql file in sql plus terminal

查看:53
本文介绍了在 sql plus 终端中执行 .sql 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个文本文件中编写了几个 sql 脚本,并使用 .sql 扩展名保存它们.我想在 sql plus 终端中执行这些脚本而不必手动键入独立的 sql 脚本,但我正在努力解决它.如果有人能列出所涉及的步骤,我将不胜感激.

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.

我可以将这些脚本复制并粘贴到终端中,但这不是我想要的,我想看看是否有办法在 sql plus 编辑器中提供脚本的路径.

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.

推荐答案

如果您的文件名为 myQueries.sql,只需输入

If your filename is myQueries.sql, just type

SQL>@/path/to/my/query/myQueries.sql
SQL>/

这篇关于在 sql plus 终端中执行 .sql 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆