PrepAway - Latest Free Exam Questions & Answers

Which data type should you use to to ensure that the database can store files that are 20 MB or less?

You are designing a database table for a content management system. Users will store images and videos in the database. You need to ensure that the database can store files that are 20 MB or less. The solution must minimize the amount of space required to store the data. Which data type should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
binary(20)

B.
varbinary(20)

C.
varbinary(max)

D.
XML

Explanation:
varbinary [ ( n | max) ]
Variable-length binary data. n can be a value from 1 through 8,000. max indicates that the maximum storage size is 2^31-1 bytes. The storage size is the actual length of the data entered + 2 bytes. Use varbinary(max) when the column data entries exceed 8,000 bytes.


Leave a Reply