Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Visual Studio 2008 中,我有这个数据库项目来管理我的 SQL Server 2008 数据库。这有一个 prebuild 和 postbuild SQL 脚本,其中包含如下示例:
:r .\myfile.sql
这是什么意思?
谷歌搜索中缺少的关键字是“sqlcmd”。
“r”命令用于在该位置包含另一个 SQL 文件的内容;传入的参数是包含文件的相对文件路径。
有关更多信息,请参阅MSDN 文档以了解 sqlcmd 语法。