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 is hash cluster in oracle?
Can you assign multiple query result rows to a variable?
How to execute a stored program unit?
What is where clause in oracle?
How many types of cluster table in Oracle?
What is oracle latest version?
What is using clause and give example?
What do you mean by a deadlock?
When do we use group by clause in a sql query?
What is translate in oracle?
Explain the use of log option in exp command.
is there a tool to trace queries, like profiler for sql server?
How to bring a tablespace offline?
What is Library Cache in Oracle?
Please send me Informatica 8.1 certification dumps, my mail id mona85gupta@gmail.com