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

Answers were Sorted based on User's Feedback



how to give permission to users that users can update/insert/delete on a row of table on timeing 1..

Answer / kart

create or replace trigger trig_aone
before insert or update or delete on aone
for each row
begin
if to_char(sysdate,'HH24') not between (9) and (18) then
raise_application_error('-20011','u cant update in business
time');
end if;
end;

Is This Answer Correct ?    11 Yes 0 No

how to give permission to users that users can update/insert/delete on a row of table on timeing 1..

Answer / hari

We have to create trigger

create trigger trg_name
before insert/delete/update on table
when sysdate between 10am to 6pm
begin
logic
end;

Is This Answer Correct ?    13 Yes 3 No

how to give permission to users that users can update/insert/delete on a row of table on timeing 1..

Answer / 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

how to give permission to users that users can update/insert/delete on a row of table on timeing 1..

Answer / cm

create one user in your windows o/s. Add this user into
your sql user in security.
This windows user provide the permission only 10am to 6pm.

Is This Answer Correct ?    0 Yes 9 No

Post New Answer

More SQL PLSQL Interview Questions

how is exception handling handled in mysql? : Sql dba

0 Answers  


1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins

0 Answers   CTS,


What are hotfixes and patches?

0 Answers  


What is a pragma statement?

0 Answers  


i have xml source. xml source having lacks of records. i want extract/retrive xml source data using sql query. please tell me how to write query.

4 Answers   TCS,






Is sql a backend?

0 Answers  


What are the advantages of normalization?

0 Answers  


What is mutating sql table?

0 Answers  


What is bulk collect in pl sql?

0 Answers  


What are the different types of a subquery?

0 Answers  


is it mandatory to select all the column in a view then what columns should be selected

2 Answers  


Whis is not false in primary key?

0 Answers   Fintellix,


Categories