mysql - SQL: insert row with expiration -


is there way insert row sql expiration (c.f. can insert new key expires in minute memcached)?

the context want integration test insert rows database, i'd prefer not deleting them myself, it's shared many. delete queries must manual, or may not run, or may have disastrous typos, etc. i'd prefer system me if can (i.e. automatically , efficiently , well-tested).

(i assume not part of sql standard , answer no.)

related: sql entries expire after 24 hours

related: what best way delete old rows mysql on rolling basis?

context: can't make changes database schema, or of associated infrastructure.

if doing unit testing, suggest wrapping each unit test in begin tran / rollback.

since doing integrated testing, need data live outside scope of single transaction. sql agent work fine here, except not distinguish between test data , real data. however, around inserting identifier specific records deleted upon expiration. done in single stored proc..

you might able accomplish using sql server service broker. have not worked service broker, maybe there way delay message processing until specific time has passed.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -