Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: normalized table query
03-15-2013, 03:46 AM #1
- Join Date
- Dec 2005
- Thanked 76 Times in 76 Posts
normalized table queryCode:
name surname car bill gates bmw bill gates renault john doe renault ...
03-15-2013, 06:16 AM #2
??? What does this have to do with Normalization???
There is not such thing as a one-table database that is normalized.
SELECT DISTINCT t1.name, t1.surname, t2.surname AS usedAsFlag FROM table AS t1 LEFT JOIN ( SELECT name, surname FROM table WHERE car = 'bmw' ) AS t2 ON t1.name = t2.name AND t1.surname = t2.surname HAVING usedAsFlag IS NULLAn optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Users who have thanked Old Pedant for this post: