DECLARE @Sql nVarchar(4000)
Declare @Total int
SET @Sql=N'SELECT @Total=Count(*) FROM PE_CommonModel'
Exec sp_executesql @Sql, N'@Total Int Out',@Total Out
Print @Total
SQL动态语句 -- 获取动态语句返回值
最新推荐文章于 2023-02-18 17:34:52 发布
DECLARE @Sql nVarchar(4000)
Declare @Total int
SET @Sql=N'SELECT @Total=Count(*) FROM PE_CommonModel'
Exec sp_executesql @Sql, N'@Total Int Out',@Total Out
Print @Total