SQL Server 2008 R2, HASHBYTES SHA256 returning NULL

1.4k views Asked by At

SQL Server 2008 R2 (SP2), HASHBYTES SHA2_256 returning NULL. Not sure if there is any settings to be configured to enable it. I understand SHA2_512 works on or above SQL 2012. But SHA2_256 should work in SQL 2008. Help me understand here please.

Below is the screenshot showing I am on 2008 R2.

enter image description here

1

There are 1 answers

1
A_Sk On BEST ANSWER

from MSDN

256 bits (32 bytes) for SHA2_256, and 512 bits (64 bytes) for SHA2_512 applies to SQL Server 2012 through SQL Server 2016.

that's why you are getting null.