select * from 表 where mid(手机号码,1,5)=mid(手机号码,6,5) and mid(手机号码,1,1)=mid(手机号码,2,1) and mid(手机号码,1,1)=mid(手机号码,3,1) and mid(手机号码,1,1)=mid(手机号码,4,1) and mid(手机号码,1,1)=mid(手机号码,5,1) and mid(手机号码,1,1)=mid(手机号码,11,1)
Public Function CompareField(strField As String) As Boolean
Dim str, strTemp As String
Dim I As Integer
str = Mid(strField, 1, 1)
CompareField = True
For I = 1 To Len(strField)
strTemp = Mid(strField, I, 1)
If strTemp <> str Then
CompareField = False
Exit Function
End If
Next
End Function
SELECT A.姓名, A.号码
FROM A
WHERE (((CompareField([号码]))=True));