开发者

Assign to a variable the number of rows a table has in SQL Server

开发者 https://www.devze.com 2023-03-03 10:11 出处:网络
How would you assign a variable the tota开发者_如何学Gol number of rows a table has in SQL Server?Something like the following should do the trick:

How would you assign a variable the tota开发者_如何学Gol number of rows a table has in SQL Server?


Something like the following should do the trick:

Declare @VariableName int

Select @VariableName=count(1) from TableName


SELECT COUNT(*) FROM Table

For more details, please provide more detail.

0

精彩评论

暂无评论...
验证码 换一张
取 消