select substr(34518,-1) from dual;

解决方案 »

  1.   

    15:10:29 SQL> select substr(34518,-1) from dual;S
    -
    8已用时间:  00: 00: 00.00
      

  2.   

    嗯,解决了!
    谢谢大家,可是
    ”用%我的程序总出错,参见我的另一个帖子
    http://community.csdn.net/Expert/topic/3534/3534674.xml?temp=.7276575

    还是不明白,谁能告诉我,会再加分的!
      

  3.   

    m_strSQL.Format(_T("select count(id) from TempTable where cast(id as varchar(30)) like '%8'"));
      

  4.   

    30不够,可再放大,注意 数字要转换成字符串才能用like