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

I have a small PL/SQL Block assume in this way begin select * from emp where empno=100; exception when others then <Some Messages> when no_data_found then <Some Messages> when too_many_rows then <Some Messages> end; The question which he asked was whether this block will get executed normally or it will throw error ? If errored out then what is the reason for the error ? Could anybody please help me ? Regards Nakul Venkataraman

3 Answers   Satyam,


Is sql database free?

0 Answers  


write a query find which rows of a table is updated on 2 days before?

3 Answers   TCS,


What is a primary key example?

0 Answers  


What is difference between inner join and self join?

0 Answers  






----> There is a table T with two columns C1 and C2. The data is as below: C1 C2 1 4 2 5 3 6

4 Answers   ICICI,


what is the difference between nested subquery and correlated subquery?

0 Answers  


what is sql? : Sql dba

0 Answers  


Explain the rollback statement?

0 Answers  


What is a table in a database?

0 Answers  


write a query to remove null following table are id name 101 dinesh null jyothi null bharathi 102 suresh null shilpha 103 prakesh null suma i want the output format like id name 101 dinesh 102 suresh 103 prakesh

3 Answers   TCS,


What is the use of triggers?

0 Answers  


Categories