how to give permission to users that users can
update/insert/delete on a row of table on timeing 10am to
6pm only?

Answer Posted / pariksheet de

Grant Insert,Update,Delete
On Employees
To All

-----------------------------------------------

Create Trigger Upd_Employees
Before Insert,Update,Delete on Employees
For Each Row
Begin
if to_char(sysdate,'Dy') in
('Mon','Tues','Wed','Thrs','Fri','Sat','Sun') and to_char
(sysdate,'hr:mi') not between ('10:00') and ('6:00')
then raise_application_error(-
20145,'Insertion/Updation/Deletion can take place between
10:00 am and 6:00);
end if;
end;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by dbms? What are its different types?

746


What are the most important ddl statements in sql?

750


What are the query optimization techniques?

711


Show how functions and procedures are called in a pl/sql block.

767


How do I delete a trigger?

723






What are the different types of joins in sql?

1153


how to fetch alternate records from a table? : Sql dba

827


What is dml statement?

699


What is an inconsistent dependency?

764


How do you go back in sql?

701


What is an exception in PL/SQL? What are the two types of exceptions?

851


How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?

870


What does sql stand for?

704


What are local and global Indexes and where they are useful.

1138


explain mysql aggregate functions. : Sql dba

727