Hi all,
I had created a view from a table employee from my database. View is created sucuessfully and when i inserted data into employee table it is also updated in the view but i tried to insert data into my view but it shows an error.
[code=sql]
create view empp as select * from employee
[/code]
[code=text]
Name DOB id
--------- ----------- ------
priya 2007-08-20 02:21:41 2
chitra 2007-08-20 03:52:29 3
lavanya 2007-09-13 16:42:43 4
arun 2007-08-20 00:30:11 1
[/code]
When I execute this query:
[code=sql]
insert into empp values('Kirthi' ,now(),5)
[/code]
[code=text]
ERROR: cannot insert into a view
SQL state: 0A000
Hint: You need an unconditional ON INSERT DO INSTEAD rule.
[/code]
Please help to solve this problem... But inserting into a view in oracle is working good......pleas e help me..
Thanks
priyan..
I had created a view from a table employee from my database. View is created sucuessfully and when i inserted data into employee table it is also updated in the view but i tried to insert data into my view but it shows an error.
[code=sql]
create view empp as select * from employee
[/code]
[code=text]
Name DOB id
--------- ----------- ------
priya 2007-08-20 02:21:41 2
chitra 2007-08-20 03:52:29 3
lavanya 2007-09-13 16:42:43 4
arun 2007-08-20 00:30:11 1
[/code]
When I execute this query:
[code=sql]
insert into empp values('Kirthi' ,now(),5)
[/code]
[code=text]
ERROR: cannot insert into a view
SQL state: 0A000
Hint: You need an unconditional ON INSERT DO INSTEAD rule.
[/code]
Please help to solve this problem... But inserting into a view in oracle is working good......pleas e help me..
Thanks
priyan..
Comment