Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
620 views
in Technique[技术] by (71.8m points)

sql server 2008 - Is there a big technical difference between VARBINARY(MAX) and IMAGE data types?

I was reading on internet these statements about SQL Server data types:

  1. VARBINARY(MAX) - Binary strings with a variable length can store up to 2^31-1 bytes.

  2. IMAGE - Binary strings with a variable length up to 2^31-1 (2,147,483,647) bytes.

Is there a really big technical difference between VARBINARY(MAX) and IMAGE data types?

If there is a difference: do we have to customize how ADO.NET inserts and updates image data field in SQL Server?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

They store the same data: this is as far as it goes.

"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)).

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...