ROWCOUNT_BIG (Transact-SQL)ROWCOUNT_BIG (Transact-SQL)

适用于: 是SQL Server是Azure SQL 数据库否Azure SQL 数据仓库否并行数据仓库APPLIES TO: yesSQL Server yesAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

返回已执行的上一语句影响的行数。Returns the number of rows affected by the last statement executed. 该函数的功能与 @@ROWCOUNT 类似,区别在于 ROWCOUNT_BIG 的返回类型为 bigint 。This function operates like @@ROWCOUNT, except the return type of ROWCOUNT_BIG is bigint.

主题链接图标 TRANSACT-SQL 语法约定Topic link icon Transact-SQL Syntax Conventions

语法Syntax

  
ROWCOUNT_BIG ( )  

返回类型Return Types

bigintbigint

RemarksRemarks

位于 SELECT 语句之后时,该函数返回由 SELECT 语句返回的行数。Following a SELECT statement, this function returns the number of rows returned by the SELECT statement.

位于 INSERT、UPDATE 或 DELETE 语句之后时,该函数返回受数据修改语句影响的行数。Following an INSERT, UPDATE, or DELETE statement, this function returns the number of rows affected by the data modification statement.

位于 IF 这类不返回行的语句之后时,该函数返回 0。Following statements that do not return rows, such as an IF statement, this function returns 0.

另请参阅See Also

COUNT_BIG (Transact-SQL) COUNT_BIG (Transact-SQL)
数据类型 (Transact-SQL)Data Types (Transact-SQL)