like C file, add reference in a SQL script file at beginning?
像C文件一样,在开始时在SQL脚本文件中添加引用?
#include "somefile.sql"
-- other code...
1 个解决方案
#1
5
If you are running them with sqlcmd you can use r:
to include other scripts
如果使用sqlcmd运行它们,则可以使用r:包含其他脚本
:r C:\Files\selectFromTable.sql
Editing SQLCMD Scripts in the Transact-SQL Editor
在Transact-SQL编辑器中编辑SQLCMD脚本
#1
5
If you are running them with sqlcmd you can use r:
to include other scripts
如果使用sqlcmd运行它们,则可以使用r:包含其他脚本
:r C:\Files\selectFromTable.sql
Editing SQLCMD Scripts in the Transact-SQL Editor
在Transact-SQL编辑器中编辑SQLCMD脚本