Excel导入数据时带入了 回车等特殊符号,,如何查询这些带有特殊符号的数据?

解决方案 »

  1.   

    where instr(col , chr(13))
      

  2.   

    贴一条你的记录看一下select hex(col) from xxx
      

  3.   

    chr(13)应该是VB中的用法在MySQL中是char(13)char(13)是回车符,char(10)是换行符
      

  4.   

    用转义符号啊。。select * from tbname where col like '%\'\%%'这个就是查询col字段还有'%的记录 用\转义
      

  5.   

    用\转义
    where col rlike '\r'; #回车
    where col rlike '\n'; #换行
    where col rlike '\r\n'; #回车换行
      

  6.   

    谢谢各位的解答!
    另还问下
    'fdshfk\t'
    这样的字段 如何更新为 'fdshfk'
      

  7.   


    update tbname
    set col=replace(col,'\t','')
      

  8.   

    update table1
    set 字段=TRIM(TRAILING '\t' FROM 字段)