March 26, 2013 at 5:49 am
Hi Team,
Am new to Oracle, i need a trigger
i have a table named Stud:
Columns : ID, Stud_Name,
Another table named : Lab
Columns : ID, Stud_ Name
i want to trigger, when ever any insert or update or delete on Stud, it need to check the Id, Stud_Name in Lab table, if available, then get
the ID and udpate status ='Y' where TABLE = "APP"
Table : APP
Columns : ID, Status
Please help me....
March 26, 2013 at 6:20 am
Minnu this looks a lot like homework, and we hate to do folks work on their behalf, because they don't learn the concepts they need later;
Oracle triggers are different than SQL triggers, as they are performed per row; a lot of us work in both environments, so you should still be able to get help here, even though it's a SQL Server Centric Forum.
If you can show us what you have so far, we can help push you in the right direction.
Lowell
March 26, 2013 at 7:14 am
i've done below.....
CREATE TRIGGER TRG_TMP
AFTER INSERT OR UPDATE OR DELETE
OF ID or Stud_Name
ON
STUD
BEGIN
--
here i need oracle query to compare the ID, stud_name in two tables,
and i want to update APP table.
END
Please help me...
March 26, 2013 at 7:31 am
take a look at the syntax for an oracle trigger here:
there's an example there, and you can see how fields are referenced with the :columnname indicator
see if that helps you build a better trigger;
http://www.techonthenet.com/oracle/triggers/after_update.php
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply