How do I find the space consumed by specific row in a SQL table.
As an example, consider the following example: There is customer and related orders . There is customer table and order table.
Table : Customer
Columns : Id, Name, Address, Occupation
PK : Id
Table : Order
Columns : OrderId, CustomerId, OrderDescription, OrderCost
PK : OrderId, CustomerId
At runtime there are two customers and one customer has 10 orders and another customer has 100 orders.
I need to write a query where given the customer id, I should return the total bytes consumed by this specific customer in Sql.
Any suggestions or inputs would be greatly helpful.