如何知道数据库中哪些表没有记录
时间:2021-07-01 10:21:17
帮助过:18人阅读
TABLE #Temp_T
GO
CREATE TABLE #Temp_T
(
[Table_Name] NVARCHAR(
128),
[Total_Records] INT
)
GO
EXEC sp_MSForEachTable
@command1 = ‘INSERT INTO #Temp_T([Table_Name], [Total_Records]) SELECT ‘‘?‘‘, COUNT(*) FROM ?‘ ;
GO
SELECT [Table_Name],
[Total_Records] FROM #Temp_T
ORDER BY [Total_Records] DESC
Source Code
如何知道数据库中哪些表没有记录
标签:click har weight insert from varchar var font 说明