I know that a natural join exists, but it is not automatic as it seems to be in MySQL.
> -----Ursprüngliche Nachricht----- > Von: Dennis Cote [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 20. November 2007 18:32 > An: sqlite-users@sqlite.org > Betreff: Re: [sqlite] Re: Performance tuning, and other > (silly?) SQLitequestions. > > Michael Ruck wrote: > >> > >> Ah. I have been reading a PHP/MySQL book, that I thought > said a MySQL > >> server would see the common column names and automagically > join the 2. > >> Either I misremember what the book said (it's not with me > >> here), or this > >> is a feature of MySQL, not present in SQLite. Anyway, what > >> you suggest > >> works just fine. > >> > > > > SQLite does not implement this feature. Its not in the SQL > standard AFAIK. > > > > > > > > This feature *is* part of the SQL standard and is implemented > by SQLite. > It is called a NATURAL JOIN. > > select * from a_table natural join b_table; > > This will select all rows where all fields with the same name > in the two > tables are equal. See http://en.wikipedia.org/wiki/Join_(SQL) > for more > details. Note, only one column, with the same name as the matching > columns from the two tables, is generated in the result (and > this column > is not considered to be from either table in standard SQL). > > HTH > Dennis Cote > > > > > > -------------------------------------------------------------- > --------------- > To unsubscribe, send email to [EMAIL PROTECTED] > -------------------------------------------------------------- > --------------- > > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------