Multiple NOT distinct

后端 未结 4 1655
甜味超标
甜味超标 2020-12-10 12:40

I\'ve got an MS access database and I would need to create an SQL query that allows me to select all the not distinct entries in one column while still keeping all the value

4条回答
  •  被撕碎了的回忆
    2020-12-10 13:39

    select 
      * 
    from 
      my_table t1, 
      my_table t2
    where 
      t1.B = t2.B
    and
      t1.C != t2.C
    
    -- apparently you need to use <> instead of != in Access
    -- Thanks, Dave!
    

    Something like that?

提交回复
热议问题