当前位置: 代码迷 >> Sql Server >> 如何样用SQL语句取出varchar字段前11位不重复的记录
  详细解决方案

如何样用SQL语句取出varchar字段前11位不重复的记录

热度:32   发布时间:2016-04-27 20:44:35.0
怎么样用SQL语句取出varchar字段前11位不重复的记录?
请问:
name       mobile
张三       13926928203
张三       13926928203/
怎么样用SQL语句取出mobile字段前11位不重复的记录?

------解决方案--------------------
Select * From TableName A Where Not Exists(Select mobile From TableName Where Left(mobile, 11) = Left(A.mobile, 11))
  相关解决方案