有一个表: 表1,结构如下
内容1     内容2
1111       kdka
1132       sdkfjal
0099       fajdsl
1111        kjlkk
0099        lkfds
经过select 语句检索 以后,我想返回
内容1   
1111    
1132
0099就是 去除那些 重名的,应该怎么做呢?
select 内容1 from 表1 然后呢?

解决方案 »

  1.   

    select distinct 内容1 from 表1
      

  2.   

    select distinct 内容1 from 表1
      

  3.   

    select distinct 内容1 from 表1
    select * from 表1 group by 内容1
    你试一下不知道行不.我机上没有SQL没有测试的
      

  4.   

    select distinct 内容1 from 表1select 内容1 from 表1 group by 内容1
      

  5.   

    select distinct 内容1 from 表1关键字distinct就是用来筛选重复列的。
      

  6.   

    select distinct 内容1 from 表1select 内容1 from 表1 group by 内容1这两个好像都可以,你试试
      

  7.   

    select distinct 内容1 from 表1
    select * from 表1 group by 内容1
    distinct:过滤重复字段