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
When do I need to use a semicolon vs a slash in oracle sql?
Explain oracle instance.
What are the extensions used by oracle reports?
What is the difference between online and offline backups?
Why use resource manager in Oracle?
How to convert times to characters in oracle?
while i take backup using ibm tsm the following errors occurred: rman-03009 ora-19513 ora-27206 ora-19502 ora-27030 ora-ora19511
How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?
What is transaction control statement and how many types of transaction control statement in Oracle?
How to use group functions in the select clause using oracle?
Does oracle database need java?
What is a trigger and what are its types?
What is Java Pool in Oracle?
How to select some columns from a table in oracle?
Can you have more than one content canvas view attached with a window ?