Microsoft SQL数据类型 [英] Microsoft SQL data type

查看:67
本文介绍了Microsoft SQL数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
使用Microsoft SQL.
我应该为字节数组数据使用哪种数据类型.谢谢

hello everyone
using Microsoft SQL.
what datatype should i use for a byte array data. thank you

推荐答案

您可以为此目的使用binaryvarbinary.
You could use either binary or varbinary for this purpose.


我建​​议varbinary 用于二进制字符串.这是将来版本中将支持的数据类型.
I''d suggest varbinary for binary strings. This is the datatype that''s going to be supported in future versions.


binary(n)用于固定长度的二进制数据,长度为varbinary(max),用于存储较大的二进制值(BLOB)

binary(n)变量存储n个字节的固定大小的二进制数据.它们最多可以存储8,000个字节
varbinary(max)变量存储大约n个字节的变长二进制数据.它们最多可以存储2 GB.
参考链接;- SQL Server中的二进制数据类型 [
binary(n) for fixed-length binary data of length and varbinary(max) which is used to store large binary values (BLOBs)

binary(n) variables store n bytes of fixed-size binary data. They may store a maximum of 8,000 bytes
varbinary(max) variables store variable-length binary data of approximately n bytes. They may store a maximum of 2 gigabytes.
Reference Link ;- Binary Data Types in SQL Server[^]


这篇关于Microsoft SQL数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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