Can anyone tell me what mistake I have done in Line 10. It gives me error code number PLSQL-00103
Joined: Feb 12, 2009
I think when you work with cursors you have to open them, e.g.
Additionally I'm not sure if you're allowed to access table itemtype in your trigger,but since it is an AFTER trigger it may be allowed...
But I think you should read about the :new and : old parameters available in triggers.
If you just want to add an item everytime a new itemtype was added you could write:
So for each row which was inserted into itemtypes an entry into item is made.
If you create this trigger before the firstentry into itemtype was made it will have the same effect as your trigger - of course without "cleaning up" items whose itemtype has been deleted. For this you would need an additional ON DELETE trigger..