Re: JOINS...
От | psql novice |
---|---|
Тема | Re: JOINS... |
Дата | |
Msg-id | 20030513010419.13137.qmail@operamail.com обсуждение исходный текст |
Ответ на | JOINS... ("psql novice" <psql_novice@operamail.com>) |
Список | pgsql-novice |
Hi Dani, I understand that part :) but what about the extra options you can specify in the join condition, like 'outer' , 'inner', 'full' etc i dont see a circumstance when you would use the extra options... ----- Original Message ----- From: Dani Oderbolz <oderbolz@ecologic.de> Date: Fri, 09 May 2003 10:29:51 +0200 To: pgsql-novice@postgresql.org Subject: Re: [NOVICE] JOINS... > Hi novice, > > >Whats the purpose of joins ?? is it the same as selecting from mulitple tables ? > > > > > In a Relational Database liek Postgresql, you try the store data which > as few redundancy as possible. > The result is that you store the data in many tables - eg. persons and > adresses will be separate > (this process is called Normalisation). > Now, to put the corresponding data together again, you need a join > between the tables that belong together. > In order to work, you need at least (numberOfTables -1) Join-Conditions, > for exaple > > SELECT > person.name, > address.line1 > FROM > person, > address > WHERE > ' Here comes the Join Condition > address.person_id = person.person_id > > If you do not specify the Join Condition, you will get all > possible combinations of persons and addresses, > the so called cartesian Product of the 2 tables. > > Cheers, Dani > > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) -- ____________________________________________ http://www.operamail.com Get OperaMail Premium today - USD 29.99/year Powered by Outblaze
В списке pgsql-novice по дате отправления: