社区
MS-SQL Server
帖子详情
distinct两列的问题
nmyou
2004-04-09 09:34:45
table1:
column1 column2
1 2
1 2
1 3
2 3
2 3
期望得到的查询结果:
column1 column2
1 2
1 3
2 3
多谢
...全文
167
6
打赏
收藏
distinct两列的问题
table1: column1 column2 1 2 1 2 1 3 2 3 2 3 期望得到的查询结果: column1 column2 1 2 1 3 2 3 多谢
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
rouqu
2004-04-09
打赏
举报
回复
再同意:)
zjcxc
元老
2004-04-09
打赏
举报
回复
select distinct column1,column2 from table1
nmyou
2004-04-09
打赏
举报
回复
e,偶想复杂了,不过一开始也试过select distinct (column1,column2) from table1,嘿嘿,分析器说偶的错了就没尝试了
leeboyan
2004-04-09
打赏
举报
回复
如果就这两列:
select distinct * from table1
jiangchuandong
2004-04-09
打赏
举报
回复
select distinct column1,column2 from table1
同意
DigJim
2004-04-09
打赏
举报
回复
select distinct column1,column2 from table1
SQL Server数据库基础到精通课程
变量定义,字段约束、等等,Select 、Where、Top、Group By 、Order By,
Distinct
、Declare等,详细可看图片和课程,本课程带有完整的SQL数据库课程课件,代码有注释解析等等,学习起来简单易懂,易上手直接操作,...
mysql
distinct
两列
_sql-MYSQL在
两列
中选择
DISTINCT
值
sql-MYSQL在
两列
中选择
DISTINCT
值我想在数据库中选择不同的值。 让我来看一个简单的例子。表:foo bar--- ---a cc fd ac af ca cd aa cc af c是的,假设我的SQL是a c。这些是我的结果:foo bar--- ---a cc fd ac af ...
mysql
distinct
两列
_SQL
Distinct
处理多列的
问题
分析了一下,该
问题
的原因是右表中作为关联的那一列数据有重复。left join的运行策略可以理解为根据左表的每一条记录的关联字段去对照右表的关联字段,如果右表的关联字段存在重复,就会生成重复的记录。如果左表...
mysql
distinct
两列
_正在检索
两列
,并对MySQL中的每列应用“
distinct
”
--------+--------------+ | author_fname | author_lname | +--------------+--------------+ | Dan | Harris | | Freida | Harris | | George | Saunders | +--------------+--------------+ 我知道如果
DISTINCT
...
mysql
distinct
两列
,MYSQL在
两列
中选择
DISTINCT
值
I want to select
distinct
values in a database. Let me run you through a quick example.Table:foo bar--- ---a cc fd ac af ca cd aa cc af cRight, let's say my SQL is SELECT
DISTINCT
...
MS-SQL Server
34,590
社区成员
254,589
社区内容
发帖
与我相关
我的任务
MS-SQL Server
MS-SQL Server相关内容讨论专区
复制链接
扫一扫
分享
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章