select * from A a,A b where a.移动电话=b.移动电话 and a.客户ID!=b.客户ID
select Ax.客户,Bx.客户,Ax.电话
from A as Ax inner join A as Bx
on Ax.电话=Bx.电话 and Ax.客户<>Bx.客户
人家明明写的是写同一表,只有一个表A,楼上非得弄多表关联。
直接查询你想要的相同电话号码
sql="select 客户ID,移动电话 from A where 移动电话='12346497' "
delete from YBSJ where [姓名] in (N'张三', N'李四')
[中文字段名] = N'字段值'