Skip to content

Filestream needs MAX

September 27, 2013

I wrote today’s Question of the Day for SQLServerCentral on Filestream. I asked which data type was needed for Filestream data, and gave a few choices. Someone pointed out that I wasn’t complete in my choices, and that was by design.

Filestream is an attribute placed on a column, not a datatype. Why it couldn’t be a datatype, I’m not sure, but that would have saved some confusion. In any case, there’s only one data type that can take the Filestream attribute, and that’s varbinary(max).  Not varchar(max), not varchar, and not variant. There isn’t, of course, a FILESTREAM type.

However I didn’t want to include MAX since I thought it might sway people towards varbinary, and I was really hoping to teach people, not have them guess. I supposed I could have included MAX with all types, but to me, the (MAX) is also an attribute for the type.

I think it’s a good question, but if you disagree, let me know. Writing better questions is something I want to do to help the community learn.

About these ads

From → Blog

Comments are closed.

Follow

Get every new post delivered to your Inbox.

Join 4,315 other followers

%d bloggers like this: