Hello, SQL 2008R2
What I would like is a way to save the information that can be shown in the Object Explorer Details tab when you are in Object Explorer and have selected Tables under a database.
I currently show Name, Row Count, Create Date, Data Space Used (KB), and Schema.
I have
which shows me everything except size. Since sys.sysindexes has page information is there a way to get from that to size? Or is there another system table I can use? I now about sp_spaceused but would rather use a single query rather than create a stored procedure.
Thank you,
djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!
What I would like is a way to save the information that can be shown in the Object Explorer Details tab when you are in Object Explorer and have selected Tables under a database.
I currently show Name, Row Count, Create Date, Data Space Used (KB), and Schema.
I have
Code:
SELECT
t.name AS TableName
, SCHEMA_NAME(t.schema_id) AS schema_name
, i.rows
, t.create_date
FROM sys.tables AS t
INNER JOIN sys.sysindexes AS i
ON t.object_id = i.id
AND i.indid < 2
Thank you,
djj
The Lord is my shepherd (Psalm 23) - I need someone to lead me!