3

i have an employee table and there is a column for photo.

1 )Can i check the total size of the column for all images ? 2) How to find the size of each employees pic size ?

Regards

Bodhi
  • 548
  • 4
  • 14
  • 26
  • 1
    Possible duplicate of [What is the size of a image field content in SQL Server?](http://stackoverflow.com/questions/10019438/what-is-the-size-of-a-image-field-content-in-sql-server) – ahmed abdelqader Mar 07 '17 at 07:06

1 Answers1

6

You can use the below code for finding the the size of the employees pic

SELECT DATALENGTH(imagecol) FROM employee group employeeID

for finding the total size you can go for sum

SELECT SUM(DATALENGTH(imagecol)) FROM  employee 
Rohit Gupta
  • 455
  • 4
  • 16