如何从 .bat 文件调用查询? (假设我的查询是:从系统中选择版本)。
我的 .bat 文件可以保存此查询返回的输出吗?我想在我的 NSIS 脚本中使用这个输出。
最佳答案
对于甲骨文:
How can I issue a single command from the command line through sql plus?
@echo select version from system; | sqlplus username/password@database
您可以将输出通过管道传输到文件并使用它,也可以将其包装在
for
中。命令来解析批处理文件中的输出。
关于sql - .bat 文件可以执行 sql 查询并返回值吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2047882/