SELECT on a to-be-determined table

Поиск
Список
Период
Сортировка
От garhone
Тема SELECT on a to-be-determined table
Дата
Msg-id 1139930910.624290.83370@g44g2000cwa.googlegroups.com
обсуждение исходный текст
Ответы Re: SELECT on a to-be-determined table
Список pgsql-sql
Hi,

I'm a new at this. So please forgive if I mess up. Also, if there is
already a reference/tutorial somewhere, feel free to point me to it.

Here's my situation:
db=# select * from projects;projid | projname
--------+----------     1 | cars     2 | houses     3 | pets
(3 rows)

db=# select * from cars;carid | carname
-------+---------    1 | ford    2 | mazda
(2 rows)

db=# select * from houses;houseid | housename
---------+-----------      1 | semi      2 | trailer      3 | mansion
(3 rows)

db=# select * from pets;petid | petname
-------+---------    1 | dog    2 | cat    3 | bird
(3 rows)

Is it possible to do this:
Give me all the rows of the table whose project id is 2 (or whatever
projid).

Thanks



В списке pgsql-sql по дате отправления:

Предыдущее
От: "bond"
Дата:
Сообщение: passing array(java) to postgre sql function
Следующее
От: "Ding Xiangguang"
Дата:
Сообщение: view of weekly data