[quote=引用 1 楼 wmxcn2000 的回复:] select id,colA,colB from mytable t where exists (select 1 from mytable where greatest(t.colA,t.colB) = colA and least(t.colA,t.colB) = colB) -- 前两年有过这个问题,试下这个语句,有问题再追问。
select id,colA,colB from mytable t where exists (select 1 from mytable where greatest(t.colA,t.colB) = colA and least(t.colA,t.colB) = colB) -- 前两年有过这个问题,试下这个语句,有问题再追问。
3,491
社区成员
18,714
社区内容
加载中
试试用AI创作助手写篇文章吧