Re: updating tables from views

From: Tony Hunt <tonster_at_bigpond.net.au>
Date: Mon, 17 Sep 2001 12:25:19 GMT
Message-ID: <PYlp7.61658$bY5.297223_at_news-server.bigpond.net.au>


Use the INSERT statement on the 'sturec' view.

ie INSERT INTO sturec(sid) VALUES (n)

These changes are effected on the respective tables.

The only problem is that you have to include all NOT NULL columns from the tables in your view and make sure you INSERT to them. This is due to NOT NULL constraint on the columns in the underlying tables. Any INSERT has to include NOT NULL columns.

"Girish Mohata" <gmohata_at_yahoo.com> wrote in message news:42a840c2.0109170040.2aa0a4db_at_posting.google.com...
> Hi,
> I have created a view:
>
> Create View sturec as (
> Select sid,slname,grade,assessnumber
> from student,enrolment,assessment
> where student.sid=enrolment.sid
> and enrollment.cid=assessment.cid);
>
> Now when i insert a record into this view using SQL:
>
> insert into sturec values ....
>
> or using Oracle Forms 6.0,
>
> how can i effect the inserts into the base tables from the views
> (after authentication and validation ofcourse).
>
> Kind Regards,
> Girish
Received on Mon Sep 17 2001 - 14:25:19 CEST

Original text of this message