mysql string comparison

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bunnytail

    #1

    mysql string comparison

    Hi,

    I have string in a field like theses: rel-1-0, rel-2-0, rel-3-0,
    rel-21-0.....

    if comparing them in this way: select 'rel-3-0'>'rel-21-0';
    Mysql will return "1" as true, this is false in our knowledge.
    I wonder if there is a way to order such string inside mysql so that
    rel-3-0 < rel-21-0?

    cheers,
    sheng
Working...