SET NOCOUNT 的用法

来源:互联网 发布:高级java工程师充电班 编辑:程序博客网 时间:2024/04/30 02:32

SQL中SET NOCOUNT的用法 

使返回的结果中不包含有关受 Transact-SQL 语句影响的行数的信息。

USE pubs
GO
-- Display the count message.
SELECT au_lname
FROM authors
GO
USE pubs
GO
-- SET NOCOUNT to ON and no longer display the count message.
SET NOCOUNT ON
GO
SELECT au_lname
FROM authors
GO
-- Reset SET NOCOUNT to OFF.
SET NOCOUNT OFF
GO

原创粉丝点击