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
Explain an integrity constrains?
Explain the use of rows option in imp command.
How to define an external table with a text file?
What is system tablespace?
Explain what are the uses of rollback segment?
How to use "in out" parameter properly?
How to view existing locks on the database?
Respected sir, Please send me technical questions related to oracle apps..
How to run the anonymous block again?
Why do we need oracle client?
How many types of tables are there in oracle?
How to build data dictionary view an new database?
List out the components of logical database structure of oracle database.
What is the relationship among database, tablespace and data file?
How to update a table row with a record?