Table Has C1 And C2 Column If Exits any record in c1 then
Update c2 record Otherwise insert new record in the C1 And
C2 (Using Procedure)
Answer Posted / ramprasad.s
Hi Answer to Your question
IS
create or replace procedure samp(cname IN sample.ename%type,
cno IN sample.eno%type)
AS
ccount number;
begin
select count(*) INTO ccount from sample;
IF ccount = 0 then
update sample set ename = cname;
else
insert into sample values(cname, cno);
END IF;
END;
Sample Table is
ENAME ENO
100
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are the different types of modules in oracle forms?
What are the set operators union, union all, minus & intersect meant to do?
How would you go about verifying the network name that the local_listener is currently using?
How do you get nicely formatted results from an oracle procedure that returns a reference cursor?
Describe varray?
How view is different from a table?
What is where clause in oracle?
What is a synonym? What are its various types?
What is oracle database 10g express edition?
How to store only time; not date and time?
Difference between hot backup vs. Cold backup?
Explain about functional dependency and its relation with table design?
What is the difference difference between $ORACLE_HOME and $ORACLE_BASE.
How to bring a tablespace online?
what is normalisation?what are its uses?