请问sql server中有没有行命令可以执行指定的SQL文件

在oracle 中可以通过以下命令
E:\Oracle\Ora81\bin\sqlplus 用户名/口令@数据库名 @f:\exam.sql
的方法在行命令下执行指定的SQL文件
在SQL server中有类似的用法吗?
---------------------------------------------------------------

对楼上作一下补充
xp_cmdshell 'isql -U sa -P Passsword -i f:\exam.sql' 就可以在
sql语句中执行外面的脚本了

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus