How can i calculate the size of only some rows for each table?
For example, with the code:
EXEC sp_spaceused 'myTable'
you obtain the size of all rows, however i want to calculate the size not of one single table, but all of them, and using the same clause for each one, something like this in pseudo-code:
foreach(Table myTable in Database)
EXEC sp_spaceused 'myTable WHERE AppId='abc''
How can i achieve this with T-SQL?
Thanks in advance
EDIT: for better clarification