Encrypt password 50 characters in VARBINARY (8000)

3

If I encrypt a 50-character password in a VARBINARY(8000) field, does it occupy some extra space when being 8000 length? Or is it how VARCHAR ?

    
asked by Luis Mata 09.06.2017 в 17:40
source

2 answers

3

The data type VARBINARY(N) or VARBINARY(8000) is equivalent to 8 Kilobytes, so it would not occupy extra space, the VARBINARY(MAX) that retains information of up to 2,000,000,000 bytes which is the equivalent of 2 GB.

So by default the space used is 8 kilobytes.

    
answered by 09.06.2017 в 17:46
3

Acts as a VARCHAR , if the length of your field is going to be varying it is recommended that you use VARBINARY otherwise you would use BINARY

Source: link

    
answered by 09.06.2017 в 17:44