表:Contact两个字段: A B
hu 美团 hu添加了美团为好友(单向)
hu 拉手 hu添加了拉手为好友(单向)
美团 hu 美团添加了hu为好友............请问各位L怎样查询hu的双向好友...3Q3Q3Q
hu 美团 hu添加了美团为好友(单向)
hu 拉手 hu添加了拉手为好友(单向)
美团 hu 美团添加了hu为好友............请问各位L怎样查询hu的双向好友...3Q3Q3Q
解决方案 »
- 帮帮忙看看这个地方是什么错误啊!!!
- 水晶报表多表联合查询问题
- 请问谁发一个公司简介的网站的源码给我?
- 新手请教,很急,大家来帮忙看看吧!!!在线等.....
- asp页面跟aspx页面session传值问题
- 为什么这样页面不能后退前一页呢?<a href="javascript:histroy.go(-1);">返回</a>我点IE的后退也可以呀?我没有禁止后退,就是想实现后
- ASP.net中DataGrid的问题
- 如何在asp.net中读入数码相机的图像,并保存
- 欢迎asp.net观众来灌水
- 怎么将后台cs的变量值传给前台页面里面script的变量
- 关于邮件问题,大侠们速度围观啊
- 求.net简易新闻发布源码
hu 美团 hu添加了美团为好友(单向)
hu 拉手 hu添加了拉手为好友(单向)
美团 hu 美团添加了hu为好友
{
select b as thename from Contact where A='hu'
UNION
select a as thename form Contact where b='hu'
} as newTable Group by thename scount >=2为双向,否则为单向
select b as thename from Contact where A='hu' and B='美团'
UNION
select a as thename form Contact where b='hu' and A='美团'
搜索2个的Count 加起来=2就可以了