SQLTeam.com | Weblogs | Forums

Help with a Trigger


#1

Hello all. I'm new to this forum and having been searching all day. I'm currently taking an Oracle class for Grad school and i'm trying to wrap my head around a problem using triggers.

I basically have a table created where it lists Item information along with with a price. An Item_ID is the primary key for that table.

I've been asked to create a separate table for historical purposes and create a trigger that will update and create an entry in the new historical database listing the Item ID along with it's new price and old price.

How can I create a trigger that will reference or update a new table every time i update the current ITEM table with a new price?


#2

This is a SQL Server forum. Oracle triggers vary greatly from SQL Server triggers. You really need to do a Google search for "Oracle trigger" and/or find an Oracle-specific forum.