SQLite trigger to update Summary Counts

Posted by jrhicks on Stack Overflow See other posts from Stack Overflow or by jrhicks
Published on 2010-05-19T20:26:59Z Indexed on 2010/05/19 20:30 UTC
Read the original article Hit count: 191

Filed under:
|

Consider the following two (hypothetical) tables

Temperature

* day
* time
* lake_name
* station
* temperature_f

Temperature_summary

* day
* lake_name
* station
* count_readings_over_75f
* count_readings_below_75f

How can I write an SQLite Trigger to update the temperature_summary table on insert. I want to increment the count.

Thank You, Jeff

© Stack Overflow or respective owner

Related posts about sqlite

Related posts about ruby