Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6594659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:50:22+00:00 2026-05-25T17:50:22+00:00

if its in unicode so the results : ( notice the N ) select

  • 0

if its in unicode so the results : ( notice the N )

select  CHECKSUM(N'2Volvo Director 20') ---341465450
select  CHECKSUM(N'3Volvo Director 30') ---341453853
select  CHECKSUM(N'4Volvo Director 40') ---341455363

but if its regular :

select  CHECKSUM('2Volvo Director 20') ---1757834048
select  CHECKSUM('3Volvo Director 30') ---1757834048
select  CHECKSUM('4Volvo Director 40') ---1757834048

Can you please explain me why in the first situation – it gives me different and in the second it gives me the same ?

there is a lead article about it which says :

However the CHECKSUM() function evaluates the type as well as compares the two strings and if they are equal, then only the same value is returned.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:50:22+00:00Added an answer on May 25, 2026 at 5:50 pm

    This seems to be collation dependant.

    DECLARE @T TABLE
    (
    SQL_Latin1_General_CP1255_CI_AS varchar(100) COLLATE SQL_Latin1_General_CP1255_CI_AS,
    Latin1_General_CI_AS varchar(100) COLLATE Latin1_General_CI_AS
    )
    INSERT INTO @T
    SELECT '2Volvo Director 20','2Volvo Director 20' UNION ALL 
    SELECT '3Volvo Director 30','3Volvo Director 30' UNION ALL 
    SELECT '4Volvo Director 40','4Volvo Director 40' UNION ALL 
    SELECT '5Volvo Director 50','5Volvo Director 50' UNION ALL 
    SELECT '6Volvo Director 60','6Volvo Director 60'
    
    SELECT 
           CHECKSUM(SQL_Latin1_General_CP1255_CI_AS) AS SQL_Latin1_General_CP1255_CI_AS,
           CHECKSUM(Latin1_General_CI_AS) AS Latin1_General_CI_AS
    FROM @T
    

    Returns

    SQL_Latin1_General_CP1255_CI_A Latin1_General_CI_AS
    ------------------------------ --------------------
    -1757834048                    -341465450
    -1757834048                    -341453853
    -1757834048                    -341455363
    -1757834048                    -341442609
    -1757834048                    -341448488
    

    CHECKSUM is documented as being more collision prone than HashBytes. I’m not sure specifically why the CP collation has this behaviour for these inputs though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Where does glibc get its database of unicode attributes, for such functions as eg,
I have been studying unicode and its Python implementation now for two days, and
iam having a jsp page Index.jsp which accept a only unicode string as its
Its possible I am just really really thick. However, looking over the SDK for
its out of question that a dao will not hold any state. however, for
Its a simple config app with 4 checkboxes and 5 textboxes, and all values
Its a .vbproj and looks like this <Project DefaultTargets=Build xmlns=http://schemas.microsoft.com/developer/msbuild/2003> <PropertyGroup> <ProjectGuid>15a7ee82-9020-4fda-a7fb-85a61664692d</ProjectGuid> all i
Its been a while I have ready Mcconnell's Code Complete . Now I read
Its friday, and in local time the clock is 3.22pm, so my brain wont
Its not really a subtraction I'm looking for. And I know its not a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.