[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libreoffice-users] Other SQL question as it affects Base
- Subject: Re: [libreoffice-users] Other SQL question as it affects Base
- From: Jay Lozier <email@example.com>
- Date: Sat, 28 Jul 2012 17:44:54 -0400
- To: firstname.lastname@example.org
On 07/28/2012 03:36 PM, Dan wrote:
An example of an inner join:Dan
"table1" INNER JOIN "table2" ON "table1"."foreign key"="table2"."primary key"
Mathematically the following seems to be possible:
"table1" INNER JOIN "table2" ON "table1"."foreign key"=2*"table2"."primary key"
Is the latter also an INNER JOIN? There seems to be other possible multipliers other than 2. Also, what about inequalities? For example, wanting to see all the rows of data for which the foreign key is less than the MAX, MIN, or Ave of the primary key. (These are three suggested "ON expressions" for an INNER JOIN. Using greater than rather than less than is another possibility.)
I'm curious since I have a mathematical background. Any ideas?
If understand the keys they are not required to be integers though they usually are. The major requirement for a key is that it is unique and only exist once in the table. Keys can include multiple columns. So multiplying a key would often not make sense. I believe you can add more requirements in the ON clause.
The reason keys are often integers is that one often defines the key as integer with automatic incrementing when a new row is added.
For unsubscribe instructions e-mail to: email@example.com
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
|Re: [libreoffice-users] Other SQL question as it affects Base||Mark Stanton <firstname.lastname@example.org>|
|[libreoffice-users] Other SQL question as it affects Base||Dan <email@example.com>|
- Prev by Date: Re: [libreoffice-users] Re: I have a question
- Next by Date: Re: [libreoffice-users] pdf creation issue on a single file?
- Previous by thread: [libreoffice-users] Other SQL question as it affects Base
- Next by thread: Re: [libreoffice-users] Other SQL question as it affects Base