Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: creating views with mulitple tables
Hi,
Part one:
Usually views are not updatable. After all views are not intended as a means
to repair bad database design.
Part two:
create view combo
as
select c.cust_id
, c.first_name , c.last_name , p.first_name , p.last_name from customer c , preference p
This is of course all well documented, and usually 'homework' like questions
are happily ignored.
You are also strongly advised not to crosspost to all oracle newsgroups, and
not to repeat your post if you don't get an answer immediately. After all
usenet is a volunteer businness. It's getting a bit late, which may explain
why I reply in this fashion.
Hth,
Sybrand Bakker, Oracle DBA
Kenny <karosenb_at_erols.com> wrote in message
news:37BDBD9D.632DB00E_at_erols.com...
> hey gang,
>
> two part question:
>
> first, i am trying to create a view selecting from two tables. the
> column names are the same in both tables, and they are primary keys in
> the corresponding tables. my question is, if after i create the view,
> and then i insert, update, or delete from that view, will it flow down
> to the underlying tables?
>
> secondly, i am having trouble with the syntax of the create view. i know
> its something like:
>
> create view combo as select cust_id, first_name, last_name from
> customer ( now here is where i dont know how to join the other table, i
> would like to also select cust_id, first_name, and last_name from
> another table called preference)
>
> any help would be GREAT!
> cheers
> -Kenny
>
> please respond to kenny_at_on2.com
>
Received on Fri Aug 20 1999 - 16:09:30 CDT