简体   繁体   English

用于图像和文档的SQL列的哪种数据类型

[英]What datatype of SQL column to use for images and documents

What data type should be use for files such as: 文件应使用哪种数据类型,例如:

doc, xls, jpg, png, dwg doc,xls,jpg,png,dwg

With a size of between 0.1 to 10 MB what should be? 大小在0.1到10 MB之间应该是什么?

Varbinary (x)
Varbinary (max)
Image

I would recommend you to use varbinary(max) for every file 我建议您对每个文件使用varbinary(max)

In SQL 2012 you might use image but it wouldn't be supported in next generations of SQL Servers. SQL 2012您可能会使用image但下一代SQL Server将不支持该image

Varbinary (x) will be useful for avoiding storing larger files than desired. Varbinary (x)将有助于避免存储比所需的更大的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM