一个表有student(id,drom,agp)
select discint drom from student where agp>2.8
解释是什么意思(这个我明白),不用discint实现它(求救).

解决方案 »

  1.   

    在agp>2.8的记录中,查找所有出现过的 drom. (当某个drom出现过多次时只显示一个).纯属语法问题,和对二维关系概念的一些考查。很基础的。最直接的实现的语句如下.当然还有其它写法不一一写了。select drom from student where agp>2.8 group by drom
      

  2.   

    select drom from student where agp>2.8 group by drom having count(*)=1
      

  3.   

    select a.* from (select drom from student where agp>2.8) a group by a.drom having count(*)=1
      

  4.   

    select drom from student where agp>2.8 group by drom having count(*)=1是什么意思?
      

  5.   

    luomingchao(什么是正确的?如何发现的?) ( ) 信誉:100  2006-08-21 19:37:00  得分: 0 我现在在深圳找工作,这是我去找工作的面试题,如果有人能做出来,请顺便讲一下,为什么为有人会出这样的题,在实际开发中,有什么意义吗?
    =================================================
    我也在深圳,好久没去人才市场了,现在找工作怎么样,
    想换个工作……
      

  6.   

    不知道,我是去天安数码城找工作的。在www.cjol.com上看到不少招聘信息。我是菜鸟,请多多指教。你现在工资多少,如果有2000块的话,如果换工作了,让小弟去跟你交接一下啊。呵呵。。我上周六来深圳的,刚找了一天
      

  7.   

    查agp>2.8的drom,如果重复只显示一个.
      

  8.   

    select drom from student where agp>2.8 group by drom 
    正解
    select drom from student where agp>2.8 group by drom having count(*)=1
    这个好象没对 选出的是不重复的drom 了?
      

  9.   

    昨晚我回去看了一下sql的书。认为:select drom from student where agp>2.8 group by drom having count(*)=1是错误的。having是对group分组后进行过滤,group是对where过滤后进行分组。
    fcuandy(猪头年年有,近期特别多) 是对的,我要结帖了,谢谢大家