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
explain normalization concept? : Sql dba
How can you view the errors encountered in a trigger?
Can we alter stored procedure?
What does subquery mean in sql?
Explain alias in sql?
When sql appeared?
What is cursor status?
Why function is used in sql?
column A column b | output 10 7 | 10 5 8 | 8 7 -9 | 7 3 5 | 5 0 6 | 6 Write a sql query to print such output.
What is the main reason behind using an index?
Which command is used to delete a package?
differentiate between float and double. : Sql dba
give the syntax of grant and revoke commands? : Sql dba
How many row comparison operators are used while working with a subquery?
Can we use ddl statements in stored procedure?