I have a question about how to using a CURSOR to update an email domain name by using an new email domain name. ex(gmail.com->hotmail.com)
execute procedure('gmail.com','hotmail.com' )
Here is what I write. please help me out, thank you!
create procedure PR_Q3
is P_NewEamil varchar2(50); P_Email_Address varchar2(50); exceptionforemail exception;
cursor E_info is select Email_Address from Broker where P_Email_Address = Email_Address
for update of Email_Address;
begin
open E_info;
fetch E_info into P_NewEamil;
while E_info%found loop
if(P_NewEamil like '%.com') then
update Broker set Email_Address = P_NewEamil where P_Email_Address = Email_Address;