Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A B C
- 1 x q
- 2 y w
- 3 y e
- 4 z r
- 5 z t
- 6 z y
- B C
- y w
- y e
- z r
- z t
- z y
- Select B, C
- From Table
- Where B In
- (Select B From Table
- Group By B
- Having COunt(*) > 1)
- select *
- from
- my_table
- where
- B in
- (select B from my_table group by B having count(*) > 1)
- 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!
Add Comment
Please, Sign In to add comment