Create a procedure to delete certain records from a table
and display the total number of records deleted in this
process. (Condition for deletion can be of ur choice, for
instance delete all records where eid='')

Answers were Sorted based on User's Feedback



Create a procedure to delete certain records from a table and display the total number of records ..

Answer / manas

create or replace procedure proc_name(noofcount out number ) is
Begin
Delete from tes_tabt;
noofcount := sql%rowcount;
End

Is This Answer Correct ?    7 Yes 1 No

Create a procedure to delete certain records from a table and display the total number of records ..

Answer / mathivanan

Create or replace procedure delete_rec_cnt is
begin
delete from MY_TABLE;
dbms_output.put_line(sql%rowcount);
end;

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is sql basics?

0 Answers  


Difference between DBMS and RDBMS...CODD's rules

4 Answers   Polaris,


Hi All, I am new to both this blog and technology. I was able to see a response for one of the questions on triggers as below. I would like to know why are we using " if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then" instead, can't we use " if sysdate = 'sunday' then". I can understand the use of "rtrim", but dont know y v r using to_char. I have seen this in many cases but did not get a convincible explaination. Please help me with this and do excuse if this question sounds silly. Thanks in advance...... create or replace trigger trg_sun before insert on <table name> begin if rtrim(to_char(sysdate,'day'))=rtrim('sunday') then raise_application_error(-20345,'no transaction in sunday'); end if; end trg_sun;

2 Answers  


Which is the best place to learn hadoop?

1 Answers  


What is the primary key?

0 Answers  






What are the most important characteristics of pl/sql?

0 Answers  


find the third highest salary?

23 Answers  


What is schema in sql example?

0 Answers  


What are different types of sql commands?

0 Answers  


What is fmtonly in sql?

0 Answers  


how can we know the number of days between two given dates using mysql? : Sql dba

0 Answers  


How to create a view on a table which does not exists

4 Answers   Oracle, TCS,


Categories