I'm a java developer and a novice Postgres user. I'm trying to create a
view that will display common fields from several different tables to
simplify some JDBC queries.
To illustrate my question, consider this example -- I have the following
Although the tables contain numerous columns each, they each contain the
following columns in common:
I would like to create a view that will display this common information as
well as a column called "Type" that will indicate what kind of record it is
- eg Car, Truck, or SUV.
I'm not trying to create a view that merges multiple rows into a single row
in the view, but instead a view that will display a subset of each row from
the different tables. For example, if each of the individual tables
contains 100 rows, the view would contain 300 rows.
I have no problem creating a view that queries a single table, but I get
stuck when trying to pull multiple tables into the view.
Can this type of view be created? If so, can someone point me in the right
direction - a keyword or syntax example would be appreciated.
pgsql-novice by date
|Next:||From: Frank Bax||Date: 2008-11-06 17:45:38|
|Subject: Re: Database Views|
|Previous:||From: Leví Teodoro da Silva||Date: 2008-11-06 11:50:35|
|Subject: [DUMP] Make a dump with special characters|