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, 04:46 AM #1
- Join Date
- Dec 2005
- Thanked 78 Times in 78 Posts
normalized table queryCode:
name surname car bill gates bmw bill gates renault john doe renault ...
03-15-2013, 07: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 NULLBe yourself. No one else is as qualified.
Users who have thanked Old Pedant for this post: