pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: garhone <cacheung@consumercontact.com>
To: pgsql-sql@postgresql.org
Subject: SELECT on a to-be-determined table
Date: 14 Feb 2006 07:28:30 -0800
Message-ID: <1139930910.624290.83370@g44g2000cwa.googlegroups.com> (raw)

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




view thread (2+ messages)  latest in thread

Message-ID: <1139930910.624290.83370@g44g2000cwa.googlegroups.com>
Permalink:  ../1139930910.624290.83370@g44g2000cwa.googlegroups.com/
Also on:    postgresql.org/message-id/1139930910.624290.83370@g44g2000cwa.googlegroups.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: cacheung@consumercontact.com
  Subject: Re: SELECT on a to-be-determined table
  In-Reply-To: <1139930910.624290.83370@g44g2000cwa.googlegroups.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox