【发布时间】:2010-08-19 03:34:47
【问题描述】:
当使用Invoke-Expression sqlcmd -i script.sql 时,它似乎只显示返回的前两行。
当我在查询分析器中运行它返回的脚本时:
(2 rows affected)
Changed database context to 'ShopStore'.
(5 rows affected)
Changed database context to 'ShopStore'.
但是从 PowerShell 我只得到:
(2 rows affected)
Changed database context to 'ShopStore'.
然而,整个事情正在运行,我可以通过玩结果来看到这一点。这是为什么呢?
【问题讨论】:
标签: powershell sqlcmd