Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 “trigger” in sql?

1015


What is pls_integer in pl sql?

1029


What is foreign key and example?

884


how to see the create table statement of an existing table? : Sql dba

945


Do we need to create index on primary key?

851


What are the query optimization techniques?

885


What will you get by the cursor attribute sql%found?

896


Mention what problem one might face while writing log information to a data-base table in pl/sql?

1158


Can a key be both primary and foreign?

943


Is it possible for a table to have more than one foreign key?

972


Is natural join and inner join same?

853


what's the difference between a primary key and a unique key? : Sql dba

970


How do you delete duplicates in sql query using rowid?

891


what are enums used for in mysql? : Sql dba

1107


Is sql developer case sensitive?

943