去掉交换重复的数据 比如有两列id1 id21 21 32 13 1怎么得到id1 id21 21 3 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select *from table1 awhere not Exists (select 1 from table1 Where id1=a.id2 and id2=a.id1 and id1<id2) 加入自增字段IDselect *from ttj awhere not Exists (select 1 from ttj Where id1=a.id2 and id2=a.id1 and a.id>id) 为什么我写的这个函数看不到源代码 sql统计结果分组 为什么? msql 存储过程有上限吗? mysql保存表数据脚本 mysql 统计分组 语句 在检索数据库数据时,提示“Can't create/write to file 'c:\windows\temp\#sql_7f0_0.MYI'错误。。。 本人有mysql翻译成的中文件文档资料。有意愿者请50分开贴。拒绝灌水 mysql数据类型问题 mysql查询条件 mysql rand()函数的一个问题 MySQL里的USER表 终端输出和导出不一致,太神奇了
from table1 a
where not Exists (select 1 from table1 Where id1=a.id2 and id2=a.id1 and id1<id2)
select *
from ttj a
where not Exists (select 1 from ttj Where id1=a.id2 and id2=a.id1 and a.id>id)