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

Write a sql select query that only returns each name only once from a table?

0 Answers  


Define overloaded procedure?

0 Answers  


Can we create a trigger on view?

0 Answers  


How to execute OS(operating system) command from pl/sql?

3 Answers  


What is a database trigger ? Name some usages of database trigger ?

4 Answers  


What are the possible values for the boolean data field?

0 Answers  


what is timestamp in mysql? : Sql dba

0 Answers  


how to see the oracle 9i/10g table in pc? or In my pc where the table is saved and how to see?

1 Answers  


is it possible to pass an object or table to a procedure as an argument?

0 Answers  


What is the difference between anonymous block and named block or stored procedure?

8 Answers  


What is the default isolation level in sql server? : Transact sql

0 Answers  


How do you retrieve the last N records from a table?

10 Answers  


Categories