Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: creating views with mulitple tables
On Fri, 20 Aug 1999 16:42:05 -0400, Kenny
<karosenb_at_erols.com> wrote:
>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?
Oracle may have relaxed the rules a bit regarding updateable views, but I don't think that you can update a view that joins two tables.
>secondly, i am having trouble with the syntax of the create view.
This should do what you want:
create view combo (
cust_id, first_name,last_name, cust_id2, first_name2,last_name,) as select c.cust_id, c.first_name, c.last_name, p.cust_id,p.first_name,p.last_name from customer c preference p
regards,
Jonathan