Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is it possible to get the size of a table by select-command in SQL-server with some conditions?
for example, I would like to get the size of the table when its date=currentTime
not for all dates just size in the table by the current date.
Thank you.

What I have tried:

size of the table in by condition
Posted
Updated 20-Oct-20 1:44am
Comments
CHill60 20-Oct-20 6:19am    
By "size" do you mean the amount of space taken up on disk or the count of records that match your conditions?
Moses_k 20-Oct-20 6:41am    
Yeah, I want to get this size on disk

1 solution

Ok. This isn't an exact science because you also need to cater for indexes but these posts will get you started -
sql server - Find the disk size of specific rows - Database Administrators Stack Exchange[^]
Calculate Data Row Space Usage In SQL Server[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900