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
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 |
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 |
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 |
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 |
What is a database trigger ? Name some usages of database trigger ?
Can a table contain multiple foreign key’s?
How do you select unique values in sql?
what is a trigger in mysql? Define different types of trigger. : Sql dba
How many types of index are there?
What Is a Trigger? How Do You Use It?
Can I copy :old and :new pseudo-records in/to an oracle stored procedure?
What is a sql select statement?
what are ddl statements in mysql? : Sql dba
How to add a column ‘salary’ to a table employee_details?
Why are aggregate functions called so?
How do you optimize SQL queries ?
6 Answers CarrizalSoft Technologies, Infosys, Oracle,
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)