SQL 加上运行多个查询

发布于 2024-09-26 11:41:53 字数 101 浏览 0 评论 0原文

我有 12 个查询要运行,但不能同时运行。我想开始第一个查询,然后一旦完成,下一个查询就开始,当它完成时,第三个查询开始,依此类推。希望这是自动的。每个查询都会写入一个 txt 文件。谢谢

I have 12 queries to run, but can not run at the same time. I would like to start the first query, then as soon as it completes the next query begins, when it completes the third query starts and so on. Want this to be automatic. Each query writes a txt file. Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

薄凉少年不暖心 2024-10-03 11:41:53

在我看来,你只需要创建一个脚本并调用该脚本:

@query1.sql
@query2.sql
...

或者我错过了什么?

Seems to me like you just have to create a script and call that script:

@query1.sql
@query2.sql
...

Or am I missing something?

夢归不見 2024-10-03 11:41:53

将它们全部粘贴到 1 个文件中,并在文件之间添加 GO 语句即可解决问题。

Paste them all in 1 file with a GO statement between should do the trick.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文