我这有个数列A里面有123456,234567,345678
我想利用数据库查询该数列A得到结果为456,567,678请问谁可以提供下语句谢谢

解决方案 »

  1.   

    select substring(A,3,20)
    from table小菜,呵呵,请给分吧,答案非常之正确
      

  2.   

    应该是
    select substring(A,4,3) 
    from table 
    这样吧.从第4位开始读取后3位
      

  3.   

    select right(ltrim(列),3) from 表
      

  4.   

    create table tb(s int)
    insert into tb select 123456
    insert into tb select 234567
    insert into tb select 345678select right(ltrim(s),3) from tb456
    567
    678
      

  5.   


    select right(rtrim(column),3) from table
      

  6.   

    --如果A列是整型
    select right(A,3) from 表名
    --如果A列是字符型
    select right(rtrim(A),3) from 表名