如果现在有一个数据库(SQL),我想知道哪些表里面有数据,能不能用SQL语句快速查出来呢?
------解决方案--------------------
SELECT o.name FROM sys.sysindexes i JOIN sys.objects o
ON i.id=o.object_id
WHERE o.type='u'
AND i.indid<=1
and rows>0--rows >0 表示有数据.
SELECT o.name FROM sys.sysindexes i JOIN sys.objects o
ON i.id=o.object_id
WHERE o.type='u'
AND i.indid<=1
and rows>0--rows >0 表示有数据.