parsed.org

Tips by tag: duplicates

Just One Will Do by xinu on Sep 06, 2007 02:15 PM

If you have a query that's returning 5 identical rows and you really only need one, you can use SELECT DISTINCT:

sql> SELECT DISTINCT foo, bar, baz FROM bing...

An alternative would be appending LIMIT 1 to the end of the query.

distinctduplicateslimitselectsql
Showing Duplicated Lines in a File by cygnus on Feb 15, 2005 04:09 PM

You can use this command to show duplicate lines in a file:

$ uniq -d MYFILE
commandsduplicatesfiltershellsortuniq
RSS