Windows批处理文件中的SQL语句 [英] SQL Statements in a Windows Batch File

查看:161
本文介绍了Windows批处理文件中的SQL语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么方法可以让Windows批处理文件直接输入SQL语句而无需调用脚本?我希望批处理文件登录到SQL,然后直接在语句中输入.

Is there any way to have a Windows batch file directly input SQL statements without calling a script? I want the batch file to login to SQL and then enter in the statements directly.

编辑:我正在使用Oracle v10g

I'm using Oracle v10g

推荐答案

对于单个命令,您可以使用以下技巧:

For a single command you can use this trick:

echo select * from dual; | sqlplus user/pw@db

这篇关于Windows批处理文件中的SQL语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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