SQL> desc product1;
Name Null? Type
----------------------------------------- --------
----------------------------
PROD_ID NOT NULL NUMBER(38)
PROD_QTY NUMBER(38)

SQL> select * from product1;

PROD_ID PROD_QTY
---------- ----------
123 300
124 200

SQL> desc pmsales;
Name Null? Type
----------------------------------------- --------
----------------------------
PROD_ID NOT NULL NUMBER(38)
PMS_QTY NUMBER(38)

SQL> select * from pmsales;

PROD_ID PMS_QTY
---------- ----------
123 100
124 200
SQL> create view pmas_prod
2 as select p.prod_id,p.prod_qty,pm.pms_qty
3 from product1 p,pmsales pm
4 where p.prod_id=pm.prod_id;

View created.
SQL> update pmas_prod
2 set prod_qty=prod_qty-pms_qty;

2 rows updated.

SQL> select * from product1;

PROD_ID PROD_QTY
---------- ----------
123 200
124 0
SQL> insert into pmas_prod values(125,400,200);
insert into pmas_prod values(125,400,200)
*
ERROR at line 1:
ORA-01776: cannot modify more than one base table through a
join view

Q How can we insert into this table ?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More English Interview Questions

which of the below functions is used to search data withing a range based on a condition?

1 Answers   eClerx,


How to decrease High Utilizatoin On Cisco 2800 seriase Router ?

0 Answers   IBM,


The word inference relates to ?

0 Answers  


can you describe for me one or two of your most important accomplishments?

0 Answers  


What is the your Aim ?

1 Answers   AGS Health,






what would be the appropriate answer about our hobby if we have not any particular hobby?

2 Answers  


plz send me,capgemini placement paper

1 Answers   Cap Gemini,


how to connect two different sub-nets in a switch.with out using router?

1 Answers  


Complete the series 1,2,5,26,?

10 Answers   SSC, Yardi,


Who is the top scorer in IPL 2?

6 Answers   Wipro,


Tell me about a time when you really had to pay attention to what someone else was saying, actively seeking to understand their message

0 Answers   RyanAir,


recently which movie u seen

1 Answers   Genpact,


Categories