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
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 |
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 |
What is sql basics?
Difference between DBMS and RDBMS...CODD's rules
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;
Which is the best place to learn hadoop?
What is the primary key?
What are the most important characteristics of pl/sql?
find the third highest salary?
What is schema in sql example?
What are different types of sql commands?
What is fmtonly in sql?
how can we know the number of days between two given dates using mysql? : Sql dba
How to create a view on a table which does not exists