Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Creating Views
Kenny wrote:
> Hey all,
>
> Two part question:
>
> First, I am trying to create a view that joins two tables, both tables
> having the same primary key. After creating the view, if I then insert,
> update, or delete a record from that view, will it affect both tables?
>
> Second, Can someone tell me the syntax of joining two tables in the
> create view statement.
>
> I know its something like:
>
> create view combo as select cust_id, first_name, last_name from customer
> ( here is the part where I want to also select cust_id, first_name,
> last_name from another table called preferences)
You cannot insert into a view that is defined with a join.
The syntax for creating a view containing a join is exactly the same syntax as entering a sql statement which contains a join except that it would be preceded with:
create or replace view myview as
select ......
etc.
Ken Received on Mon Aug 23 1999 - 07:15:32 CDT
![]() |
![]() |