parsed.org

Tips by tag: select

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
RSS