MicroSoft Technologies
Tuesday, 18 September 2012
List all SQL Tables and its record count
This code sample shows how to list all Tables and its data Rows count
SELECT
o
.
name as TableName
,
i
.
rows
as TblRowCount
FROM
sysobjects
o
INNER
JOIN
sysindexes
i
ON
(
o
.
id
=
i
.
id
)
WHERE
o
.
xtype
=
'u'
AND
i
.
indid
<
2
Out Put :-
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment