PI Hash Value Generation for Same Value and Different Data Type

General
Enthusiast

PI Hash Value Generation for Same Value and Different Data Type

Hi,

      I have a general question, For the Same Value but with different data type, How the Hash value will be generated? Same or Different?

For EG:

INTEGER PI value 123 and VARCHAR PI Value 123, For both of this same Hash value will be generated or different Hash Value will be generated?

Tags (2)
3 REPLIES
Supporter

Re: PI Hash Value Generation for Same Value and Different Data Type

You are able to answer this question to your own

try

select rowhash(cast(123 as integer)) ;

select rowhash(cast('123' as varchar(10)));

Some are hashed the same - but mainly datatypes of the same class like smallint, integer. But some are hashed differently.


Enthusiast

Re: PI Hash Value Generation for Same Value and Different Data Type

thats right, but the correct function to find the hash value is HASHROW() :)

Supporter

Re: PI Hash Value Generation for Same Value and Different Data Type

true - I pick always the wrong order ;-)