I want to get file type from binary data in a column File_Stream
in FileTable.
In FileTable, there is File_Type
column but it's not reliable.
Pay attention to the following queries:
These files are the same!
I want to get file type from binary data in a column File_Stream
in FileTable.
In FileTable, there is File_Type
column but it's not reliable.
Pay attention to the following queries:
These files are the same!
The file_type
column value is derived from the file name, not the binary contents of the file. SQL Server has no notion of what the actual binary contents represent.