摘要: 目的: 过滤某个字段中含有空格的数据。比如:字段name中有数据“nick zhang”, “nickZhang”,我想选出“nick zhang”。常见做法:使用charindex()函数:select name from testUser where charindex(‘ ‘, name) > 0;原理:使用charindex()判断当前的name是否包含空格。Code:Create table testUser (name nvarchar(2000));insert into testUser values('nick zhang');insert into t 阅读全文
posted @ 2011-09-02 08:50 TonnyGu 阅读(3134) 评论(0) 推荐(0) 编辑