输出不显示 - SQL Server
我在存储过程的 while 循环中有一条 print 语句。该过程更新了大约 20,000 条记录。 print 语句应该打印出每条记录的主键,但即使该过程完全执行并更新所有记录,它也不会显示在输出窗口中。 sql server Management Studio 中输出窗口中可以输入的数据量是否有限制?
I have a print statement in a while loop of a stored procedure. The procedure updates around 20,000 records. The print statement should print out the primary key of each record but it does not display in the output window even though the procedure executes entirely and updates all the records. Is there some limit to the amount of data that can be put into the output window in sql server management studio?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否可能以某种方式打印空值,并得到一堆空行?
Are you perhaps printing a null somehow, and getting a pile of blank lines?
显示的字符数有限制,但具体取决于您是将结果输出到文本还是网格。
默认情况下,文本结果每列 256 个字符,发送到网格的结果每列 65535 个字符。
您可以通过单击 SQL Server Management Studio 中的
查询
菜单并选择查询选项...
来查看当前设置。There is a limit to the number of characters displayed but it varies depending on if you're outputting the results to text or to a grid.
By default it's 256 characters per column for text results and 65535 characters for results sent to grid.
You can see the current settings by clicking on the
Query
menu and selectingQuery Options...
in SQL Server Management Studio.