Sql Server 2005 去掉字段中的空格

SELECT  replace(ltrim(rtrim(Realname)),' ','') AS Realname
FROM  UserInfo
WHERE  replace(ltrim(rtrim(Realname)),' ','') ='张飞'

 

posted @ 2014-06-18 10:49  逍遥散人95  阅读(253)  评论(0编辑  收藏  举报