字符串也可以比较的。按照ascii循序大小sql.add('seelct * from tablename where kkk>"aaa"');返回记录例如当 kkk=abc、aab、 .................

解决方案 »

  1.   

    sybase、SQL有convert
    Ora有to_number
      

  2.   

    我的表是t1      t2     t3  
    aaa     bbb    15
    sdd     ad     100.3
    sd      sd     129t1,t2,t3都是string型
    t3代工资
    现要取出工资>50的记录
    怎样写sql语句?
      

  3.   

    No.1
    select * from table1
    where convert(float, t3) > 50No.2
    select * from table1
    where cast(t3 as float) > 50