Hey,
How do you do a query that selects non matching rows from a single table by camparing values in one field.
Say two rows had:
FieldName : 5
FieldName : 4
This in a query should be noticed and selected as the two rows have different field values.
Any idea how this is done?
Select non matching rows
Moderator: General Moderators
- DigitalMind
- Forum Contributor
- Posts: 152
- Joined: Mon Sep 27, 2010 2:27 am
- Location: Ukraine, Kharkov
Re: Select non matching rows
If I got you right:
Code: Select all
select distinct fieldname from yourtable- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Select non matching rows
otherwise... GROUP BY fieldname
Re: Select non matching rows
I vote for using DISTINCT.
Using GROUP BY clause just to achieve the DISTINCT functionality should be considered a bad practice.
Using GROUP BY clause just to achieve the DISTINCT functionality should be considered a bad practice.
There are 10 types of people in this world, those who understand binary and those who don't