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 are sql functions? Describe the different types of sql functions?

559


How do I delete a trigger?

545


Explain the structure of pl/sql in brief.

621


How many clustered indexes can be created on a table?

593


What are the main features of cursor?

631






explain access control lists. : Sql dba

557


What are the different types of constraints?

566


What do you mean by rowid?

538


What is dml statement?

517


What is package in pl sql with an examples?

549


What is dynamic sql in pl sql?

495


What are different methods to trace the pl/sql code?

544


How you improve the performance of sql*loader? : aql loader

580


how to increment dates by 1 in mysql? : Sql dba

541


Can we insert in sql function?

549