What is the best data type to store pictures and text together? in ms sql

What is the best data type to store pictures and text together? in ms sql
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ste5anSenior DeveloperCommented:
Please define "pictures and text together".
goodkAuthor Commented:
like an article with pictures and text
Walter RitzelSenior Software EngineerCommented:
Usually, we use BLOB or CLOB. and their variations LONGBLOB OR LONGCLOB.
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Duy PhamFreelance IT ConsultantCommented:
Pictures and text are not the same type, so you firstly have to convert them into the same type (either as binary or as text). And then you can use IMAGE, BINARY, VARBINARY or TEXT, NTEXT, VARCHAR, NVARCHAR to store the converted data.

However, I don't recommend this because it requires a lot of overhead in effort of data conversion when putting into database or getting them out. Proper way could be that you store pictures and text in different tables and then make links between them in order to process pictures and text together later.
Scott PletcherSenior DBACommented:
I believe you have to use varbinary(max) for that, even though it doesn't recognize text as characters when stored that way.  But no character-type column would be able to hold the picture.
Walter RitzelSenior Software EngineerCommented:
Just an article to reinforce what was said:
ste5anSenior DeveloperCommented:
Go for DocumentDB..

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
goodkAuthor Commented:
thank you guys
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Query Syntax

From novice to tech pro — start learning today.