comparing the varchar data type value

  • glen.wass (6/16/2011)


    so Cheat is < than cheat

    It really does "Depend". What it depends on is the default server collation, the collation of a given column in the table when it was first built, and the collation hints in a query. "Cheat" and "cheat" will be treated as identical data using the installation default collation in SQL Server. Binary forms of collation will certainly operate the way you say. There are other collations where lowercase words will actually come first.

    My recommendation is that you pop open Books Online and lookup "Collation" and "Collate" for much more information on the subject.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply