Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
How to Get Table Rows and Sizes from Database
WhatsApp
Khan Abrar Ahmed
Jun 10
2015
874
0
0
DECLARE
@tmpTableSizes
AS
table
(
TableName
varchar
(1024),
TableRows
int
,
ReservedSize
varchar
(50),
DateSize
varchar
(50),
IndexSize
varchar
(50),
UnUsedSize
varchar
(50)
)
insert
@tmpTableSizes
EXEC
sp_MSforeachtable @command1 =
"EXEC sp_spaceused '?'"
select
*
from
@tmpTableSizes
order
by
TableName
desc
SQL Server
Get the row
get the size
Up Next
How to Get Table Rows and Sizes from Database