Thread: Replacing old tuples on insert

Replacing old tuples on insert

From
"Pradeepkumar, Pyatalo (IE10)"
Date:
Hi all,

I have a table as follows -
table TrendData( TrendID bigserial,
                 TrendName varchar(30),
                 .....
                 .....);

Now for this table i want a maximum of only 5000 tuples. After the
maximum is reached the new tuples that are inserted should replace the
older ones. Could anyone help me out in writing the query or a trigger
would also be fine.

Thanx and Regards,
Pradeep