sql-servert-sqldatalength

What is the size of a image field content in SQL Server?


I have a table in SQL Server. This table has an image field and the application stores files in it.

Is there a way to read the size of the file in the image field using T-SQL?


Solution

  • SELECT DATALENGTH(imagecol) FROM  table
    

    See MSDN