Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql 我可以得到不是';在我的桌子上你没有倒立吗?_Sql - Fatal编程技术网

Sql 我可以得到不是';在我的桌子上你没有倒立吗?

Sql 我可以得到不是';在我的桌子上你没有倒立吗?,sql,Sql,我有一张桌子: 1|5 2|4 3 | 3 4|2 5|1 (实际的表中有很多名称,我只想得到每个组合的一组名称) 是否有一种方法可以只获取结尾处未重复的行? 我只想要: 1|5 2|4 3 | 3 排。。我可以在sql中执行此操作吗?这能解决您的问题吗: select * from MyTable where ColA <= ColB 选择* 从MyTable 这能解决你的问题吗 select * from MyTable where ColA <= ColB 选择* 从MyT

我有一张桌子:
1|5
2|4
3 | 3
4|2
5|1
(实际的表中有很多名称,我只想得到每个组合的一组名称)
是否有一种方法可以只获取结尾处未重复的行?
我只想要:
1|5
2|4
3 | 3

排。。我可以在sql中执行此操作吗?

这能解决您的问题吗:

select *
from MyTable
where ColA <= ColB
选择*
从MyTable

这能解决你的问题吗

select *
from MyTable
where ColA <= ColB
选择*
从MyTable
其中可乐类似于:

select distinct(case when x<y then x||'|'||y else y||'|'||x end) from table;
选择distinct(当x类似于:

select distinct(case when x<y then x||'|'||y else y||'|'||x end) from table;

选择distinct(然而,当xIt可能时,如果表中的值是20和5,而没有相应的5和20,该怎么办?但是,如果表中的值是20和5,而没有相应的5和20,该怎么办?就在我要去的地方……我对发布者唯一关心的是,他/她是否希望保留原始列作为co。)我要去的地方…我唯一关心的是,发帖的人是否想保留原来的栏目作为栏目,而不是用管道连接在一起。