I want to do some tests to my database, (like turning off the machine while its still writting something) To do this I\'m planing to insert a movie file in database with 700
Binary(50) will hold 50 bytes - this is not going to be enough to hold 700mb.
From MSDN:
binary [ ( n ) ]
Fixed-length binary data with a length of n bytes, where n is a value from 1 through 8,000. The storage size is n bytes.
You should use VARBINARY(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.
You could also use Image, though it is deprecated.