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


Please Help Members By Posting Answers For Below Questions

What is hash cluster in oracle?

831


Can you assign multiple query result rows to a variable?

754


How to execute a stored program unit?

804


What is where clause in oracle?

770


How many types of cluster table in Oracle?

792


What is oracle latest version?

847


What is using clause and give example?

815


What do you mean by a deadlock?

752


When do we use group by clause in a sql query?

797


What is translate in oracle?

834


Explain the use of log option in exp command.

756


is there a tool to trace queries, like profiler for sql server?

826


How to bring a tablespace offline?

757


What is Library Cache in Oracle?

856


Please send me Informatica 8.1 certification dumps, my mail id mona85gupta@gmail.com

1635