Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Implementing Trigger problem





  Hi,

  No matter how i read the manual i can't understand it. :(

  Here is what i would like to do.

  for example i have

  table:   classes
column:  classno,...,schedule_count

  table:  schedules
column:   classno,time

I would like to create a trigger that everytime there is an insert or delete in schedules classes.schedule_count will be updated with number of schedules entered in schedules for that particular class.  this way i could track the number of schedules for that particular class without counting the schedules.

  how do i implement it?

  thank you,
oscar
 



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group