VARBINARY(MAX) 和 IMAGE 数据类型之间是否存在很大的技术差异? [英] Is there a big technical difference between VARBINARY(MAX) and IMAGE data types?
问题描述
我在互联网上阅读了这些关于 SQL Server 数据类型的陈述:
I was reading on internet these statements about SQL Server data types:
VARBINARY(MAX)
- 二进制字符串可变长度可以存储到 2^31-1 个字节.
VARBINARY(MAX)
- Binary strings with a variable length can store up to 2^31-1 bytes.
IMAGE
- 二进制字符串可变长度高达 2^31-1(2,147,483,647) 个字节.
IMAGE
- Binary strings with a
variable length up to 2^31-1
(2,147,483,647) bytes.
VARBINARY(MAX)
和 IMAGE
数据类型之间是否存在很大的技术差异?
Is there a really big technical difference between VARBINARY(MAX)
and IMAGE
data types?
如果有区别:我们是否必须自定义 ADO.NET 在 SQL Server 中插入和更新图像数据字段的方式?
If there is a difference: do we have to customize how ADO.NET inserts and updates image data field in SQL Server?
推荐答案
它们存储相同的数据:这是目前为止.
They store the same data: this is as far as it goes.
"image
" 已被弃用,并且有一组有限的功能和操作可以使用它.varbinary(max)
可以像较短的 varbinary
一样操作(text
和 varchar(max)
也是如此).
"image
" is deprecated and has a limited set of features and operations that work with it. varbinary(max)
can be operated on like shorter varbinary
(ditto for text
and varchar(max)
).
不要将 image
用于任何新项目:只需在此处搜索人们对 image
和 text
数据类型的问题,因为有限功能.
Do not use image
for any new project: just search here for the issues folk have with image
and text
datatypes because of the limited functionality.
Examples from SO: One, Two
这篇关于VARBINARY(MAX) 和 IMAGE 数据类型之间是否存在很大的技术差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!