This is a discussion on how to define such a trigger.... within the DB2 forums, part of the Database Server Software category; --> is it possible to define such a trigger on a table that once the table is X megabyte, or ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| >> is it possible to define such a trigger on a table that once the table is X megabyte, or the has over 10000 records [sic:rows are not records], the table is purged? << CREATE TRIGGER Flush_at_10K_Rows AS .. IF (SELECT COUNT(*) FROM Foobar) >= 10000 THEN DELETE FROM Foobar END IF; I cannot think of a good way to look at the physical file size, which different from the row count. |