concepts?
От
D.C.
Тема
concepts?
Дата
Msg-id
3cada42b537ee33889d47c23cce1d914@yahoo.fr
Список
Дерево обсуждения
concepts? D.C. <coughlandesmond@yahoo.fr>
Re: concepts? Tom Lane <tgl@sss.pgh.pa.us>
Problem with Out-of-resources error? cbrazvan@laitek.com
Re: Problem with Out-of-resources error? tgoodaire@linux.ca (Tim Goodaire)
Re: Problem with Out-of-resources error? "Buddy Shearer" <bshearer@fortegra.com>
Re: Problem with Out-of-resources error? D.C. <coughlandesmond@yahoo.fr>
Re: Problem with Out-of-resources error? Razvan Costea-Barlutiu <cbrazvan@laitek.com>
Re: Problem with Out-of-resources error? tgoodaire@linux.ca (Tim Goodaire)
Re: Problem with Out-of-resources error? Razvan Costea-Barlutiu <cbrazvan@laitek.com>
Re: concepts? Stephan Szabo <sszabo@megazone.bigpanda.com>
X-No-Archive: true Hi again, My test database is taking shape, and I'm starting to get the hang of it, but there's one concept that I just can't get my head around, and it is this: if I do .. test=> select * from people, job; .. why does every entry get displayed seven times (there are seven 'people' in each table) ? In other words, why do I *need* to do this .. test=> select * from people, job where people.id = job.id ; ... in order for every name to be displayed just once ? Then if I do this ... test=> select DISTINCT people.nom,people.prenom,job.boite, secteur.description from people, job, secteur where job.secteur_id = secteur.sector_id; ... every single person gets printed seven times, with their belonging to each sector of activity. :-( So I get 42 rows, whereas I only want seven: one for each person, with their name, their first name, their company name, and the 'sector' in which that company fits. For example, my wife is a teacher, and so she appears as 'SMITH JOAN TEACHING CIVIL_SERVICE. Perfect. Except that she also gets listed as working for the *other* six companies in the db, and as belonging to their respective sectors. What am I doing wrong ? :-( D.
В списке pgsql-novice по дате отправления