0

In Microsoft SQL Server 14

print checksum('-test-')
print checksum('-t-e-s-t-')

returns the same output:

-1854252673
-1854252673

What is wrong?

Dale K
  • 25,246
  • 15
  • 42
  • 71
  • 1
    SQL Server 14 - is this SQL Server **2014**, or do you mean SQL Server **v14** = SQL Server 2017 ?? Please be precise! – marc_s Apr 13 '20 at 06:33

2 Answers2

0

Try to use HASHBYTES() instead of CHECKSUM().

Read this document.

zealous
  • 7,336
  • 4
  • 16
  • 36
  • That is a suggestion, not an answer. And one without explanation does not really teach much of anything. – SMor Apr 13 '20 at 12:21
0

It depends on your collation.

On my Computer, collation is French_100_BIN2 and your queries returns : 44180589 1803164231

SQLpro
  • 3,994
  • 1
  • 6
  • 14