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 suggestions do you have to reduce the network traffic?
What is the minimum client footprint required to connect c# to an oracle database?
How to connect to a remote server?
What is the quickest way to fetch the data from a table?
What is a trigger and what are its types in oracle?
What is a dynamic performance view in oracle?
How to bring a tablespace offline?
What is the parameter mode that can be passed to a procedure?
What is oracle host variable?
i wrote a pl/sql procedure. it must run every sunday 4.40 How can i schedule it with the help of dbms_jobs (or another other procedure with out creating bat file,exe file)
How to convert a date to char in oracle? Give one example.
How can we delete duplicate rows in a table?
Explain the use of compress option in exp command.
Can u please explain me the Discussion on Except ,using cast like type cast. Question in the context of difference between two tables
Explain the use of Merge statement in oracle 11g