Quantcast
Channel: Recent Edits
Viewing all articles
Browse latest Browse all 12198

HASHBYTES is deterministic

$
0
0
In case someone would like to know if HASHBYTES is deterministic: it is!To prove that my statement is correct, try this on the AdventureWorksDW database:ALTER TABLE dbo.dimemployeeADD hashval AS HASHBYTES('SHA1', LastName + '|' + FirstName) PERSISTEDSELECT COLUMNPROPERTY(OBJECT_ID('dbo.dimemployee'), 'hashval', 'IsDeterministic')You'll see that the SELECT statement returns 1. (Also, the ALTER TABLE statement would have failed if the column definition would be non-deterministic.)

Viewing all articles
Browse latest Browse all 12198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>