摘要:
如下: DECLARE @SearchSql NVARCHAR(MAX) DECLARE @Count INT SET @SearchSql = 'SELECT @Count = COUNT(*) FROM t_pl_test ' EXEC sp_executesql @SearchSql,N'@C 阅读全文
摘要:
示例demo: DECLARE @table IdTableType INSERT INTO @table SELECT Id FROM dbo.t_pl_test DECLARE @SearchSQL NVARCHAR(MAX) SET @SearchSQL = N'SELECT * FROM @ 阅读全文