Search code examples
mysqlcomparison

MySql: Compare 2 strings which are numbers?


I have a column in my table, it holds values such as 100012345. The column is varchar. Now I want to compare this to similiar values in a where:

... where myColumn > '100012345'

for example. How could I do that?

Thanks!


Solution

  • select * from your_table
    where cast(your_column as signed) = 100012345