摘要: 如下: DECLARE @SearchSql NVARCHAR(MAX) DECLARE @Count INT SET @SearchSql = 'SELECT @Count = COUNT(*) FROM t_pl_test ' EXEC sp_executesql @SearchSql,N'@C 阅读全文
posted @ 2024-05-20 19:46 顾星河 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 示例demo: DECLARE @table IdTableType INSERT INTO @table SELECT Id FROM dbo.t_pl_test DECLARE @SearchSQL NVARCHAR(MAX) SET @SearchSQL = N'SELECT * FROM @ 阅读全文
posted @ 2024-05-20 14:13 顾星河 阅读(50) 评论(0) 推荐(0) 编辑