VarBinary vs Image SQL Server 数据类型来存储二进制数据? [英] VarBinary vs Image SQL Server Data Type to Store Binary Data?

查看:30
本文介绍了VarBinary vs Image SQL Server 数据类型来存储二进制数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将二进制文件存储到 SQL Server 数据库.Varbinary 和 Image 哪个数据类型更好?

I need to store binary files to the SQL Server Database. Which is the better Data Type out of Varbinary and Image?

推荐答案

由于图像已被弃用,您应该使用 varbinary.

Since image is deprecated, you should use varbinary.

每个 Microsoft (感谢@Christopher 的链接)

ntext 、 text 和 image 数据类型将在未来移除Microsoft SQL Server 的版本.避免在 new 中使用这些数据类型开发工作,并计划修改当前使用的应用程序他们.请改用 nvarchar(max)、varchar(max) 和 varbinary(max).

ntext , text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead.

用于存储大型非 Unicode 和Unicode 字符和二进制数据.Unicode 数据使用 UNICODE UCS-2字符集.

Fixed and variable-length data types for storing large non-Unicode and Unicode character and binary data. Unicode data uses the UNICODE UCS-2 character set.

这篇关于VarBinary vs Image SQL Server 数据类型来存储二进制数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆