Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Practice 1: Changes to data will only be allowed on tables
during normal office hours of 8.45 in the morning until
5.30 in the afternoon, MONDAY through FRIDAY.

A. Create a procedure called SECURE_DML that prevents the
DML statement from executing outside of normal office
hours, returning the message:
“you may only make changes during normal office hours”

b. Create a statement trigger on the PRODUCT table which
calls the above procedure.

c. Test it by inserting a new record in the PRODUCT table.



Practice 1: Changes to data will only be allowed on tables during normal office hours of 8.45 in t..

Answer / narenkumar reddy

create or replace
procedure SECURE_DML
is

begin
if to_char(sysdate,'h24:mi') not between '08:30' and '17:30' and
to_char(sysdate,'day') not between 'MONDAY' and 'FRIDAY' then
raise_application_error(-20001,'you may only make changes during normal
office hours');
end if;
end;

create or replace
trigger trigger_name
before insert or update or delete on PRODUCT
begin
SECURE_DML( );
end;

Is This Answer Correct ?    22 Yes 3 No

Post New Answer

More SQL PLSQL Interview Questions

explain the difference between bool, tinyint and bit. : Sql dba

0 Answers  


how can you see all indexes defined for a table? : Sql dba

0 Answers  


What is embedded sql with example?

0 Answers  


what is the difference difference between procedure and packages

2 Answers   3i Infotech, Oracle,


What is procedure in pl sql?

0 Answers  


what is 'mysqlshow'? : Sql dba

0 Answers  


what is self join and why is it required? : Sql dba

1 Answers  


Who is the owner of mysql database?

0 Answers  


What is the difference between numeric and autonumber?

0 Answers  


what tools available for managing mysql server? : Sql dba

0 Answers  


What is execute immediate?

0 Answers  


How do I edit a trigger in sql developer?

0 Answers  


Categories