日期:2014-05-19  浏览次数:20498 次

怎么样用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))