select   *   from   table1   where   charindex(char(10),colname)   >   0  

char(13)代表回车键  
   
  select   *   from   你的表   where   charindex(char(13),列名)>0       
    
    
  如果你要查询换行,就要用回车换行.  
  char(13)+char(10)  
   
  select   *   from   你的表   where   charindex(char(13)+char(10),列名)>0

在sql中替换去掉回车符的sql语句:

把回车符替换成空;

update tablename set field1=replace(field1,' ','')

或:

update tablename set field1=replace(replace(field1,char(10),''),char(13),'')

回车符号在sql中是char(13),第一个命令我用过;第二个命令没在实际测试用,如果要替换为其他字符值,把单引号中加入相应值即可。

posted on 2010-11-22 19:25  craig  阅读(464)  评论(0编辑  收藏  举报
我要啦免费统计