All Forums General
Prabhu_Teradata 17 posts Joined 06/12
12 Sep 2012
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?

Thanks, Prabhu
Tags:
ulrich 816 posts Joined 09/09
12 Sep 2012

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.

 

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

Qaisar Kiani 337 posts Joined 11/05
13 Sep 2012

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

ulrich 816 posts Joined 09/09
13 Sep 2012

true - I pick always the wrong order ;-)

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

You must sign in to leave a comment.