Find Objects and Row count of each table in Database

Share via:

Find Objects and Row count of each table in Database

create table #tablesize
(name nvarchar(120),rows char(11),reserved varchar(18),
data varchar(18),index_size varchar(18),unused varchar(18))
go
insert into #tablesize
exec
sp_msforeachtable @command1=
‘exec sp_spaceused ”?”’
select * from #tablesize
go
drop table #tablesize

 

Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates

KTEXPERTS is always active on below social media platforms.

Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts
Instagram : https://www.instagram.com/knowledgesharingplatform

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (10 votes, average: 5.00 out of 5)
Loading...

One thought on “Find Objects and Row count of each table in Database

Leave a Reply to Sai Roja Cancel reply