select * from 表名 where cast(substring(等级,起始位,长度) as int )>30

解决方案 »

  1.   

    不知道你是否考虑前缀字符,如果不考虑,如下就行了:
    select * from tablename where 等级>'30' and 等级 like '3%'
    否则,
    select * from tablename where 等级>'前缀30' and 等级 like '前缀3%'
      

  2.   

    上面只是大于30,少为改一下
    不知道你是否考虑前缀字符,如果不考虑,如下就行了:
    select * from tablename where 等级>'30'
    否则,
    select * from tablename where 等级>'前缀30'
      

  3.   

    select * from table where cast(replace(等级,'p','') as decimal(10,2))>30
      

  4.   

    string strQuery="select * from tablename where 等级>'"+前缀+"30'";