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
how the indexes are stored in the Oracle Database?
HI ALL, CAN ANYONE TELL ME THE DIFFERENCES BETWEEN SQL CLUSTURS,MSQL CLUSTERS,ORACLE CLUSTERS.......THANKS IN ADVANCE
How to write date and time literals in oracle?
What are internal user account in oracle?
How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?
How can windows applications connect to oracle servers?
Can you assign multiple query result rows to a variable?
How to create a table index in oracle?
How many types of tables supported by oracle?
how to clone 9i Database on to 10g Database.
Describe the types of sub query?
Explain implicit cursor.
When do I need to use a semicolon vs a slash in oracle sql?
How to run create database statement again?
What is archive log in Oracle?