Re: Select from multiple tables
| От | Jim C. Nasby |
|---|---|
| Тема | Re: Select from multiple tables |
| Дата | |
| Msg-id | 20030606193150.GH40542@flake.decibel.org обсуждение исходный текст |
| Ответ на | Select from multiple tables (Jon Earle <je_pgsql@kronos.honk.org>) |
| Список | pgsql-general |
On Fri, Jun 06, 2003 at 11:17:01AM -0400, Jon Earle wrote: > > Hi, > > I want to select data from two tables, with the keying information for the > second table coming from the select results of the first. Can this be > done in one call, or will I need to resort to two calls - one to get the > record from the first table, then a second call to get the record from the > second table based on a key contained in the first results set? SELECT * FROM table1 t1, table2 t2 WHERE t1.key_field = t2.key_field; -- Jim C. Nasby (aka Decibel!) jim@nasby.net Member: Triangle Fraternity, Sports Car Club of America Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"
В списке pgsql-general по дате отправления: